Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/compel
diff options
context:
space:
mode:
authorjiang wei <jwcesign@gmail.com>2022-03-23 16:48:16 +0300
committerAndrei Vagin <avagin@gmail.com>2022-04-29 03:53:52 +0300
commit46e4773c3b8fdc37028db121c9018c71ddb114ff (patch)
treea65a47c935e314c74e7b1766ebe55311b547209d /compel
parent5109fccf8c3246586bc13409164c373afe070192 (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.c6
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;
}
}