shithub: scc

Download patch

ref: 2a60c595e712d405d7aefdc7cef07bdfa0e4b407
parent: 5b002ffca45fa45171f1bde5fc009b8ed085249d
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Oct 29 17:53:14 EDT 2021

nm: Remove spureous strerror() output

Readobj() returns error in cases where errno is not set,
so using strerror() can generate strange messages.

--- a/src/cmd/nm.c
+++ b/src/cmd/nm.c
@@ -162,10 +162,8 @@
 		goto err1;
 	}
 
-	if (readobj(obj, fp) < 0) {
-		error(strerror(errno));
+	if (readobj(obj, fp) < 0)
 		goto err2;
-	}
 
 	for (i = 0; getsym(obj, &i, &sym); i++) {
 		if (newsym(&sym, &tbl) < 0)