pkgsrc/comms/synce-rra/patches/patch-ai
rillig 6a59efc1e3 Fixed the compiler warnings (here with -Werror) the proper way, by doing
the type casts just before calling the <ctype.h> functions.
2007-10-10 17:12:51 +00:00

31 lines
929 B
Text

$NetBSD: patch-ai,v 1.1 2007/10/10 17:12:53 rillig Exp $
--- lib/parser.c.orig 2005-05-13 11:31:07.000000000 +0000
+++ lib/parser.c 2007-10-10 17:06:48.000000000 +0000
@@ -55,6 +55,8 @@ struct _Parser
size_t propval_count;
};
+#define myisdigit(c) isdigit((unsigned char)(c))
+
bool parser_duration_to_seconds(const char* duration, int* result)/*{{{*/
{
enum { dur_sign, dur_p, dur_any, dur_time, dur_end } state = dur_sign;
@@ -122,7 +124,7 @@ bool parser_duration_to_seconds(const ch
break;
default:
- if (isdigit(*p))
+ if (myisdigit(*p))
{
value = (value * 10) + (*p - '0');
}
@@ -153,7 +155,7 @@ bool parser_duration_to_seconds(const ch
break;
default:
- if (isdigit(*p))
+ if (myisdigit(*p))
{
value = (value * 10) + (*p - '0');
}