diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2021-05-12 15:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2021-05-12 15:00:00 +0000 |
commit | 43ac25c2de7ba21fb8f9e4d4db0c01c1408da0b8 (patch) | |
tree | 58617743db7d4b80213835016034f8cd7b5cbb26 /src | |
parent | adc201f81902f3015a841869756ed4b9b811fe33 (diff) | |
download | elfutils-43ac25c2de7ba21fb8f9e4d4db0c01c1408da0b8.tar.gz |
elfcompress: fix exit status regression in case of "Nothing to do"
When elfcompress decides that no section data needs to be updated and
therefore the file does not have to be rewritten, it still has to exit
with a zero status indicating success.
Resolves: https://sourceware.org/bugzilla/show_bug.cgi?id=27856
Fixes: c497478390de ("elfcompress: Replace cleanup() with label")
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/elfcompress.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c5ecc05b..47c7eb79 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2021-05-12 Dmitry V. Levin <ldv@altlinux.org> + + * elfcompress.c (process_file): Set res to 0 in case of "Nothing to do". + 2021-04-19 Martin Liska <mliska@suse.cz> * elfclassify.c (run_classify): Use startswith. diff --git a/src/elfcompress.c b/src/elfcompress.c index d5bc3300..7340e878 100644 --- a/src/elfcompress.c +++ b/src/elfcompress.c @@ -522,6 +522,7 @@ process_file (const char *fname) if (verbose > 0) printf ("Nothing to do.\n"); fnew = NULL; + res = 0; goto cleanup; } |