Fix previous fix to agree with the man page - don't report errors in

kvm_open() if errstr is NULL.
This commit is contained in:
Bruce Evans 1995-02-25 16:44:01 +00:00
parent 5dddb8148b
commit 64f14011a8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6701

View File

@ -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;