diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-08-03 00:09:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2020-08-03 00:09:02 +0000 |
commit | 7664df588d034be783cbbf4da4fac93c640c62e0 (patch) | |
tree | 0dfc67bb16c049f46ac4c8e0c940b5457cdcf07b /bin/ps | |
parent | 1b43a766b3174efa60ea7aa0c9e733de33c8b68b (diff) |
clang10 identifies an argv[] comparison against '\0' instead of NULL,
it results in the same, but is incorrect.
ok millert
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 97774bb94b8..71d4a72a842 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.74 2019/06/23 17:18:50 deraadt Exp $ */ +/* $OpenBSD: print.c,v 1.75 2020/08/03 00:09:01 deraadt Exp $ */ /* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */ /*- @@ -156,7 +156,7 @@ command(const struct kinfo_proc *kp, VARENT *ve) } } } - if (argv == NULL || argv[0] == '\0' || + if (argv == NULL || argv[0] == NULL || strcmp(cmdpart(argv[0]), kp->p_comm)) { if (wantspace) { putchar(' '); |