commit 1b2abe9121af61480d3966bd5d2b4411751bcb6a
parent a9645b102283223091826bff01b2441fb8514e41
Author: Michael Forney <mforney@mforney.org>
Date: Mon, 30 Mar 2026 14:25:06 -0700
as: Fix error check for output allocation
Does not make sense to compare a pointer to be less than NULL
and this was obviously a typo.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cmd/scc-as/symbol.c b/src/cmd/scc-as/symbol.c
@@ -377,7 +377,7 @@ ibinfmt(void)
exit(EXIT_FAILURE);
}
- if ((obj = newobj(t)) < 0) {
+ if ((obj = newobj(t)) == NULL) {
fputs("as: error allocating output\n", stderr);
exit(EXIT_FAILURE);
}