diff options
author | jiang wei <jwcesign@gmail.com> | 2022-03-23 16:48:16 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2022-04-29 03:53:52 +0300 |
commit | 46e4773c3b8fdc37028db121c9018c71ddb114ff (patch) | |
tree | a65a47c935e314c74e7b1766ebe55311b547209d /compel | |
parent | 5109fccf8c3246586bc13409164c373afe070192 (diff) |
style: delete some redundant code
There is some redundant in compel/src/main.c, making it better
Signed-off-by: jiang wei <jwcesign@gmail.com>
Diffstat (limited to 'compel')
-rw-r--r-- | compel/src/main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compel/src/main.c b/compel/src/main.c index f461ff04d..632354582 100644 --- a/compel/src/main.c +++ b/compel/src/main.c @@ -94,7 +94,6 @@ static int piegen(void) } if (handle_binary(mem, st.st_size)) { - close(fd), fd = -1; unlink(opts.output_filename); goto err; } @@ -102,8 +101,7 @@ static int piegen(void) ret = 0; err: - if (fd >= 0) - close(fd); + close(fd); if (opts.fout) fclose(opts.fout); if (!ret) @@ -347,11 +345,9 @@ int main(int argc, char *argv[]) printf("Version: %d.%d.%d\n", COMPEL_SO_VERSION_MAJOR, COMPEL_SO_VERSION_MINOR, COMPEL_SO_VERSION_SUBLEVEL); exit(0); - break; default: // '?' // error message already printed by getopt_long() return usage(1); - break; } } |