diff options
Diffstat (limited to 'crypto/kerberosIV/lib/roken/parse_units.c')
-rw-r--r-- | crypto/kerberosIV/lib/roken/parse_units.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crypto/kerberosIV/lib/roken/parse_units.c b/crypto/kerberosIV/lib/roken/parse_units.c index 7dafa77..34c5030 100644 --- a/crypto/kerberosIV/lib/roken/parse_units.c +++ b/crypto/kerberosIV/lib/roken/parse_units.c @@ -14,12 +14,7 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Kungliga Tekniska - * Högskolan and its contributors. - * - * 4. Neither the name of the Institute nor the names of its contributors + * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -38,7 +33,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> -RCSID("$Id: parse_units.c,v 1.10 1999/06/23 12:41:35 assar Exp $"); +RCSID("$Id: parse_units.c,v 1.12 1999/12/02 16:58:51 joda Exp $"); #endif #include <stdio.h> @@ -83,6 +78,7 @@ parse_something (const char *s, const struct units *units, const struct units *u, *partial_unit; size_t u_len; unsigned partial; + int no_val_p = 0; while(isspace((unsigned char)*p) || *p == ',') ++p; @@ -91,6 +87,7 @@ parse_something (const char *s, const struct units *units, if (val == 0 && p == next) { if(!accept_no_val_p) return -1; + no_val_p = 1; } p = next; while (isspace((unsigned char)*p)) @@ -107,7 +104,7 @@ parse_something (const char *s, const struct units *units, ++p; val = -1; } - if (val == 0) + if (no_val_p && val == 0) val = 1; u_len = strcspn (p, ", \t"); partial = 0; |