Don't call warnx() without a format string (localized error messages

could conceivably cause a crash).

Obtained from:	OpenBSD
This commit is contained in:
kris 2000-08-05 06:06:48 +00:00
parent b0f07577a0
commit 009b162adf

View File

@ -487,8 +487,8 @@ do_io(path, cmd, cciop)
#define KVM_ABORT(kd, str) { \
(void)kvm_close((kd)); \
warnx((str)); \
warnx(kvm_geterr((kd))); \
warnx("%s", (str)); \
warnx("%s", kvm_geterr((kd))); \
return (1); \
}
@ -622,7 +622,7 @@ print_ccd_info(cs, kd)
readsize) != readsize) {
printf("\n");
warnx("can't read component info");
warnx(kvm_geterr(kd));
warnx("%s", kvm_geterr(kd));
goto done;
}
@ -632,7 +632,7 @@ print_ccd_info(cs, kd)
cip[i].ci_pathlen) != cip[i].ci_pathlen) {
printf("\n");
warnx("can't read component pathname");
warnx(kvm_geterr(kd));
warnx("%s', kvm_geterr(kd));
goto done;
}
printf((i + 1 < cs->sc_nccdisks) ? "%s " : "%s\n", path);