summaryrefslogtreecommitdiff
path: root/security/isakmpd/patches/patch-an
blob: db40b9aca1d16945b81b4e41debf8ee85d529d18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$NetBSD: patch-an,v 1.1 2004/11/22 12:42:46 shannonjr Exp $

--- ./conf.c.orig	2003-09-02 12:15:55.000000000 -0600
+++ ./conf.c
@@ -118,7 +118,7 @@ conf_hash (char *s)
 
   while (*s)
     {
-      hash = ((hash << 1) | (hash >> 7)) ^ tolower (*s);
+      hash = ((hash << 1) | (hash >> 7)) ^ tolower ((int) *s);
       s++;
     }
   return hash;
@@ -271,7 +271,7 @@ conf_parse_line (int trans, char *line, 
 	line[strcspn (line, " \t=")] = '\0';
 	val = line + i + 1 + strspn (line + i + 1, " \t");
 	/* Skip trailing whitespace, if any */
-	for (j = sz - (val - line) - 1; j > 0 && isspace (val[j]); j--)
+	for (j = sz - (val - line) - 1; j > 0 && isspace ((int)val[j]); j--)
 	  val[j] = '\0';
 	/* XXX Perhaps should we not ignore errors?  */
 	conf_set (trans, section, line, val, 0, 0);
@@ -749,11 +749,11 @@ conf_get_list (char *section, char *tag)
   while ((field = strsep (&p, ",")) != NULL)
     {
       /* Skip leading whitespace */
-      while (isspace (*field))
+      while (isspace ((int)*field))
 	field++;
       /* Skip trailing whitespace */
       if (p)
-	for (t = p - 1; t > field && isspace (*t); t--)
+	for (t = p - 1; t > field && isspace ((int)*t); t--)
 	  *t = '\0';
       if (*field == '\0')
 	{