public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e98c02b
)
Improved testing for 0-strings in the routine "mycat".
author
ceriel
<none@none>
Thu, 11 Dec 1986 17:04:40 +0000
(17:04 +0000)
committer
ceriel
<none@none>
Thu, 11 Dec 1986 17:04:40 +0000
(17:04 +0000)
mach/proto/ncg/compute.c
patch
|
blob
|
history
diff --git
a/mach/proto/ncg/compute.c
b/mach/proto/ncg/compute.c
index
c86e073
..
d023fd8
100644
(file)
--- a/
mach/proto/ncg/compute.c
+++ b/
mach/proto/ncg/compute.c
@@
-86,8
+86,8
@@
string salloc(),strcpy(),strcat();
string mycat(s1,s2) register string s1,s2; {
register string s;
- if (s1==0) return(s2);
- if (s2==0) return(s1);
+ if (s1==0
|| *s1=='\0'
) return(s2);
+ if (s2==0
|| *s2=='\0'
) return(s1);
s=salloc(strlen(s1)+strlen(s2)+1);
strcpy(s,s1);
strcat(s,"+");