commit 9b355acf495a70ce2767ffae671fe2ae22521a2e
parent e9e9983ebccd77f991af91b1010b179f556148ff
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 2 Jul 2022 08:56:37 +0200
strip: Fix error handling in doit()
It was printing always "cannot strip it".
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/cmd/strip.c b/src/cmd/strip.c
@@ -44,7 +44,7 @@ doit(char *fname)
}
if ((src = fopen(fname, "rb")) == NULL) {
error("opening src file");
- goto err0;
+ return;
}
if ((type = objtype(src, NULL)) < 0) {
error("getting object type");
@@ -99,8 +99,6 @@ err2:
delobj(obj);
err1:
fclose(src);
-err0:
- error("cannot strip it");
}
static void