summaryrefslogtreecommitdiff
path: root/src/cmd/cc/lexbody
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/cc/lexbody')
-rw-r--r--src/cmd/cc/lexbody6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/cc/lexbody b/src/cmd/cc/lexbody
index 24f9bdc85..f4cc19c2e 100644
--- a/src/cmd/cc/lexbody
+++ b/src/cmd/cc/lexbody
@@ -96,7 +96,7 @@ alloc(int32 n)
p = malloc(n);
if(p == nil) {
print("alloc out of mem\n");
- exit(1);
+ exits("alloc: out of mem");
}
memset(p, 0, n);
return p;
@@ -110,7 +110,7 @@ allocn(void *p, int32 n, int32 d)
p = realloc(p, n+d);
if(p == nil) {
print("allocn out of mem\n");
- exit(1);
+ exits("allocn: out of mem");
}
if(d > 0)
memset((char*)p+n, 0, d);
@@ -245,7 +245,7 @@ lookup(void)
}else
*w++ = *r;
}
- *w++ = '\0';
+ *w = '\0';
h = 0;
for(p=symb; c = *p; p++)