summaryrefslogtreecommitdiffstats
path: root/usr.sbin/apmd
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-08-20 15:09:34 +0000
committerbrian <brian@FreeBSD.org>2001-08-20 15:09:34 +0000
commit9e766e7f13d026d09ebeb4382645602066d515f1 (patch)
treee4cd080245144f4b39a65872690adec1ed0c8bda /usr.sbin/apmd
parent894d298c86524f82e074b5df0bb25939bc20c3ec (diff)
downloadFreeBSD-src-9e766e7f13d026d09ebeb4382645602066d515f1.zip
FreeBSD-src-9e766e7f13d026d09ebeb4382645602066d515f1.tar.gz
Handle snprintf() returning < 0 (not just -1)
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/apmd')
-rw-r--r--usr.sbin/apmd/contrib/pccardq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/apmd/contrib/pccardq.c b/usr.sbin/apmd/contrib/pccardq.c
index 1c551a1..1562c55f 100644
--- a/usr.sbin/apmd/contrib/pccardq.c
+++ b/usr.sbin/apmd/contrib/pccardq.c
@@ -164,7 +164,7 @@ get_slot_info(int so, int slot, char **manuf, char **version, char
char *_version;
char *_device;
- if ((slen = snprintf(buf, sizeof buf, "N%d", slot)) == -1) {
+ if ((slen = snprintf(buf, sizeof buf, "N%d", slot)) < 0) {
warnc(0, "write");
goto err;
}
OpenPOWER on IntegriCloud