summaryrefslogtreecommitdiff
path: root/cond.c
diff options
context:
space:
mode:
Diffstat (limited to 'cond.c')
-rw-r--r--cond.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/cond.c b/cond.c
index 2d2f08760c7a..19163008250f 100644
--- a/cond.c
+++ b/cond.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $ */
+/* $NetBSD: cond.c,v 1.71 2015/12/02 00:28:24 sjg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.71 2015/12/02 00:28:24 sjg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94";
#else
-__RCSID("$NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $");
+__RCSID("$NetBSD: cond.c,v 1.71 2015/12/02 00:28:24 sjg Exp $");
#endif
#endif /* not lint */
#endif
@@ -490,6 +490,10 @@ CondCvtArg(char *str, double *value)
double d_val;
errno = 0;
+ if (!*str) {
+ *value = (double)0;
+ return TRUE;
+ }
l_val = strtoul(str, &eptr, str[1] == 'x' ? 16 : 10);
ech = *eptr;
if (ech == 0 && errno != ERANGE) {