Exit status of 255 in case of an error is probably not what elfcompress
users expect, change it to 1.
Reported-by: Vitaly Chikunov <vt@altlinux.org>
Fixes: 92acb57eb046 ("elfcompress: New utility.")
2021-05-12 Dmitry V. Levin <ldv@altlinux.org>
+ * elfcompress.c (process_file): Return 1 instead of -1 in case of an
+ error.
+
* elfcompress.c (process_file): Remove redundant assignment in case of
"Nothing to do".
/* How many sections are we talking about? */
size_t shnum = 0;
- int res = -1;
+ int res = 1;
fd = open (fname, O_RDONLY);
if (fd < 0)