From 00796bd8d1d323668b04af092e391947f31880e5 Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Mon, 7 Aug 2017 12:09:47 +0200 Subject: [PATCH] logutil: Drop unneeded filename check Any error will be properly handled by open() call in next statement anyway. Change-Id: Ic92433adbaad9065bf6db2759b32f055c23179c5 --- src/logutil/logutil.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/logutil/logutil.c b/src/logutil/logutil.c index 295e5a4..43f23d5 100755 --- a/src/logutil/logutil.c +++ b/src/logutil/logutil.c @@ -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); -- 2.7.4