diff --git a/src/libc/gen/strcasecmp.c b/src/libc/gen/strcasecmp.c index 893a554..8d8fe94 100644 --- a/src/libc/gen/strcasecmp.c +++ b/src/libc/gen/strcasecmp.c @@ -67,5 +67,5 @@ strncasecmp(s1, s2, n) while (n-- > 0 && cm[(unsigned char)*s1] == cm[(unsigned char)*s2++]) if (*s1++ == '\0') return(0); - return(n == 0 ? 0 : cm[(unsigned char)*s1] - cm[(unsigned char)*--s2]); + return(n == -1 ? 0 : cm[(unsigned char)*s1] - cm[(unsigned char)*--s2]); } diff --git a/sys/include/proc.h b/sys/include/proc.h index f0d932b..4cca294 100644 --- a/sys/include/proc.h +++ b/sys/include/proc.h @@ -97,7 +97,7 @@ struct proc *pidhash [PIDHSZ]; extern struct proc proc[]; /* the proc table itself */ struct proc *freeproc, *zombproc, *allproc, *qs; /* lists of procs in various states */ -int nproc; +extern int nproc; /* * Init the process queues.