projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
08901f4
)
don't bsearch() the null entry.
author
Ralph Campbell
<ralph@ucbvax.Berkeley.EDU>
Mon, 2 Mar 1992 12:53:11 +0000
(
04:53
-0800)
committer
Ralph Campbell
<ralph@ucbvax.Berkeley.EDU>
Mon, 2 Mar 1992 12:53:11 +0000
(
04:53
-0800)
SCCS-vsn: bin/ps/keyword.c 5.11
usr/src/bin/ps/keyword.c
patch
|
blob
|
blame
|
history
diff --git
a/usr/src/bin/ps/keyword.c
b/usr/src/bin/ps/keyword.c
index
f191444
..
1fcd18c
100644
(file)
--- a/
usr/src/bin/ps/keyword.c
+++ b/
usr/src/bin/ps/keyword.c
@@
-6,7
+6,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)keyword.c 5.1
0
(Berkeley) %G%";
+static char sccsid[] = "@(#)keyword.c 5.1
1
(Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
@@
-304,7
+304,7
@@
findvar(p)
key.name = p;
v = (VAR *)bsearch(&key, var,
key.name = p;
v = (VAR *)bsearch(&key, var,
-
sizeof(var)/sizeof(VAR)
, sizeof(VAR), vcmp);
+
sizeof(var)/sizeof(VAR) - 1
, sizeof(VAR), vcmp);
if (v && v->alias) {
if (hp) {
if (v && v->alias) {
if (hp) {