logutil: Drop unneeded filename check 63/142863/7
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Mon, 7 Aug 2017 10:09:47 +0000 (12:09 +0200)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Thu, 10 Aug 2017 11:01:18 +0000 (11:01 +0000)
Any error will be properly handled by open() call in next statement anyway.

Change-Id: Ic92433adbaad9065bf6db2759b32f055c23179c5

src/logutil/logutil.c

index 295e5a4..43f23d5 100755 (executable)
@@ -571,18 +571,13 @@ static void handle_pipe(struct fd_info **data_fds, int fd_count, int dump, struc
  * @param[in] filename The file name
  * @return A fd wrapper struct on valid file, else NULL
  */
-struct fd_info * handle_file(char const * filename)
+struct fd_info *handle_file(char const *filename)
 {
        assert(filename);
 
        int r;
        int fd;
 
-       if (!strlen(filename)) {
-               fprintf(stderr, "Empty filename given\n");
-               return NULL;
-       }
-
        fd = open(filename, O_RDONLY);
        if (fd < 0) {
                fprintf(stderr, "File \"%s\" could not be opened: %m\n", filename);