diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-04-21 00:15:44 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2005-04-21 00:15:44 +0000 |
commit | eac56f78004e6fc7e746a743c1159c49c62aac5b (patch) | |
tree | 9c1895a326c49091d6884c5f70d1ad4b311c55bc /sys/arch/mvmeppc | |
parent | 586259d0716ace494e2ee64d7b25fb0089521aec (diff) |
correct idiom for snprintf failure handling; ok beck
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/autoconf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/mvmeppc/mvmeppc/autoconf.c b/sys/arch/mvmeppc/mvmeppc/autoconf.c index 720f1ae33a1..5af7911b9f1 100644 --- a/sys/arch/mvmeppc/mvmeppc/autoconf.c +++ b/sys/arch/mvmeppc/mvmeppc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.12 2004/12/25 23:02:25 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.13 2005/04/21 00:15:42 deraadt Exp $ */ /* * Copyright (c) 1996, 1997 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -37,7 +37,7 @@ * from: Utah Hdr: autoconf.c 1.31 91/01/21 * * from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93 - * $Id: autoconf.c,v 1.12 2004/12/25 23:02:25 miod Exp $ + * $Id: autoconf.c,v 1.13 2005/04/21 00:15:42 deraadt Exp $ */ /* @@ -315,7 +315,7 @@ setroot() len = snprintf(buf, sizeof buf, "%s%d", findblkname(majdev), unit); - if (len >= sizeof(buf)) + if (len == -1 || len >= sizeof(buf)) panic("setroot: device name too long"); bootdv = getdisk(buf, len, part, &rootdev); |