diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-06-05 18:11:25 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-06-05 18:11:25 +0000 |
commit | e24090eb3a797e5f9a03d68354396bb36afd28f2 (patch) | |
tree | 47d7bd53bf4aaac82ddc54b2e48f0c474d954661 /bin/ps/print.c | |
parent | e11700e21ef6e32612bde060eef8120b23330acf (diff) | |
download | FreeBSD-src-e24090eb3a797e5f9a03d68354396bb36afd28f2.zip FreeBSD-src-e24090eb3a797e5f9a03d68354396bb36afd28f2.tar.gz |
Widen the scope of fmt.c::1.19 and consistently use errx(3) if malloc(3) [or
realloc(3)] happens to fail, everywhere in ps(1).
Discussed with: bde, charnier (a while ago)
fmt_argv() can no longer return NULL, so don't bother checking.
Submitted by: bde
Diffstat (limited to 'bin/ps/print.c')
-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 fefb005..f885770 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -108,11 +108,11 @@ command(KINFO *k, VARENT *ve) } if ((vis_args = malloc(strlen(k->ki_args) * 4 + 1)) == NULL) - err(1, NULL); + errx(1, "malloc failed"); strvis(vis_args, k->ki_args, VIS_TAB | VIS_NL | VIS_NOSLASH); if (k->ki_env) { if ((vis_env = malloc(strlen(k->ki_env) * 4 + 1)) == NULL) - err(1, NULL); + errx(1, "malloc failed"); strvis(vis_env, k->ki_env, VIS_TAB | VIS_NL | VIS_NOSLASH); } else vis_env = NULL; |