diff options
author | bde <bde@FreeBSD.org> | 1995-02-25 16:44:01 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-02-25 16:44:01 +0000 |
commit | a43c038744cf2382fec632c2a96707b6f7aa0fb0 (patch) | |
tree | a0102439e0e5174792002996a94f94cc9cbdf5ef /lib/libkvm | |
parent | 17a5fa641ede870f78ea93174d7e0fdf3554b523 (diff) | |
download | FreeBSD-src-a43c038744cf2382fec632c2a96707b6f7aa0fb0.zip FreeBSD-src-a43c038744cf2382fec632c2a96707b6f7aa0fb0.tar.gz |
Fix previous fix to agree with the man page - don't report errors in
kvm_open() if errstr is NULL.
Diffstat (limited to 'lib/libkvm')
-rw-r--r-- | lib/libkvm/kvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c index 7b72075..8eb0056 100644 --- a/lib/libkvm/kvm.c +++ b/lib/libkvm/kvm.c @@ -290,8 +290,9 @@ kvm_open(uf, mf, sf, flag, errstr) register kvm_t *kd; if ((kd = malloc(sizeof(*kd))) == NULL) { - (void)fprintf(stderr, "%s: %s\n", - errstr ? errstr : "kvm_open" , strerror(errno)); + if (errstr != NULL) + (void)fprintf(stderr, "%s: %s\n", + errstr, strerror(errno)); return (0); } kd->program = errstr; |