shithub: scc

Download patch

ref: 46b51055e0657109fb95d93022d2e1614290311e
parent: afec1bc0e0ba8999c706adf6438cd74d18715a88
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Apr 5 10:32:12 EDT 2022

cc1: Remove unneeded code

The atoi() operation is performed at the beginning of the function
so the check and second atoi are doing nothing.

--- a/src/cmd/cc/cc1/cpp.c
+++ b/src/cmd/cc/cc1/cpp.c
@@ -333,10 +333,7 @@
 		elen = sprintf(buffer, "%d ", lineno);
 		goto substitute;
 	}
-	if (!sym->u.s)
-		return 1;
 
-	macro.npars = atoi(sym->u.s);
 	if (!parsepars(&macro))
 		return 0;
 	elen = copymacro(&macro);