[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11720 - in gnunet/src: arm fs testing topology transport u
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11720 - in gnunet/src: arm fs testing topology transport util |
Date: |
Sun, 13 Jun 2010 12:34:46 +0200 |
Author: grothoff
Date: 2010-06-13 12:34:46 +0200 (Sun, 13 Jun 2010)
New Revision: 11720
Modified:
gnunet/src/arm/gnunet-service-arm.c
gnunet/src/fs/fs_uri.c
gnunet/src/testing/testing_group.c
gnunet/src/topology/gnunet-daemon-topology.c
gnunet/src/transport/gnunet-service-transport.c
gnunet/src/util/configuration.c
gnunet/src/util/program.c
Log:
pass only unsigned char to isspace and the like
Modified: gnunet/src/arm/gnunet-service-arm.c
===================================================================
--- gnunet/src/arm/gnunet-service-arm.c 2010-06-13 09:50:07 UTC (rev 11719)
+++ gnunet/src/arm/gnunet-service-arm.c 2010-06-13 10:34:46 UTC (rev 11720)
@@ -382,7 +382,7 @@
while (NULL != (optpos = strstr (options, "$")))
{
optend = optpos + 1;
- while (isupper (*optend)) optend++;
+ while (isupper ( (unsigned char) *optend)) optend++;
b = *optend;
if ('\0' == b)
next = "";
Modified: gnunet/src/fs/fs_uri.c
===================================================================
--- gnunet/src/fs/fs_uri.c 2010-06-13 09:50:07 UTC (rev 11719)
+++ gnunet/src/fs/fs_uri.c 2010-06-13 10:34:46 UTC (rev 11720)
@@ -927,7 +927,7 @@
rpos = in;
while ('\0' != *rpos)
{
- switch (tolower(*rpos))
+ switch (tolower( (unsigned char) *rpos))
{
case 'a':
case 'e':
@@ -962,7 +962,7 @@
case 'y':
case 'z':
/* convert characters listed above to lower case */
- *wpos = tolower(*rpos);
+ *wpos = tolower( (unsigned char)*rpos);
wpos++;
case '!':
case '.':
@@ -1149,7 +1149,7 @@
pos = searchString;
while ('\0' != *pos)
{
- if ((saw_quote == 0) && (isspace (*pos)))
+ if ((saw_quote == 0) && (isspace ((unsigned char) *pos)))
{
inWord = 0;
}
@@ -1180,7 +1180,7 @@
pos = searchString;
while ('\0' != *pos)
{
- if ((saw_quote == 0) && (isspace (*pos)))
+ if ((saw_quote == 0) && (isspace ( (unsigned char) *pos)))
{
inWord = 0;
*pos = '\0';
@@ -1573,7 +1573,7 @@
static int
needs_percent (char c)
{
- return (!((isalnum (c)) ||
+ return (!((isalnum ( (unsigned char) c)) ||
(c == '-') || (c == '_') || (c == '.') || (c == '~')));
}
Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c 2010-06-13 09:50:07 UTC (rev 11719)
+++ gnunet/src/testing/testing_group.c 2010-06-13 10:34:46 UTC (rev 11720)
@@ -2542,12 +2542,12 @@
{
off = 2;
/* skip leading spaces */
- while ((0 != *hostnames) && (isspace (*hostnames)))
+ while ((0 != *hostnames) && (isspace ( (unsigned char) *hostnames)))
hostnames++;
rpos = hostnames;
while ('\0' != *rpos)
{
- if (isspace (*rpos))
+ if (isspace ( (unsigned char) *rpos))
off++;
rpos++;
}
@@ -2557,7 +2557,7 @@
pos = start;
while ('\0' != *pos)
{
- if (isspace (*pos))
+ if (isspace ( (unsigned char) *pos))
{
*pos = '\0';
if (strlen (start) > 0)
Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c 2010-06-13 09:50:07 UTC
(rev 11719)
+++ gnunet/src/topology/gnunet-daemon-topology.c 2010-06-13 10:34:46 UTC
(rev 11720)
@@ -1100,19 +1100,19 @@
}
entries_found = 0;
pos = 0;
- while ((pos < frstat.st_size) && isspace (data[pos]))
+ while ((pos < frstat.st_size) && isspace ( (unsigned char) data[pos]))
pos++;
while ((frstat.st_size >= sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)) &&
(pos <= frstat.st_size - sizeof (struct
GNUNET_CRYPTO_HashAsciiEncoded)))
{
memcpy (&enc, &data[pos], sizeof (struct
GNUNET_CRYPTO_HashAsciiEncoded));
- if (!isspace (enc.encoding[sizeof (struct
GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
+ if (!isspace ( (unsigned char) enc.encoding[sizeof (struct
GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Syntax error in topology specification at offset %llu,
skipping bytes.\n"),
(unsigned long long) pos);
pos++;
- while ((pos < frstat.st_size) && (!isspace (data[pos])))
+ while ((pos < frstat.st_size) && (!isspace ( (unsigned char)
data[pos])))
pos++;
continue;
}
@@ -1146,7 +1146,7 @@
}
}
pos = pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded);
- while ((pos < frstat.st_size) && isspace (data[pos]))
+ while ((pos < frstat.st_size) && isspace ( (unsigned char) data[pos]))
pos++;
}
GNUNET_free (data);
Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c 2010-06-13 09:50:07 UTC
(rev 11719)
+++ gnunet/src/transport/gnunet-service-transport.c 2010-06-13 10:34:46 UTC
(rev 11720)
@@ -1054,13 +1054,13 @@
}
entries_found = 0;
pos = 0;
- while ((pos < frstat.st_size) && isspace (data[pos]))
+ while ((pos < frstat.st_size) && isspace ( (unsigned char) data[pos]))
pos++;
while ((frstat.st_size >= sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)) &&
(pos <= frstat.st_size - sizeof (struct
GNUNET_CRYPTO_HashAsciiEncoded)))
{
colon_pos = pos;
- while ((colon_pos < frstat.st_size) && (data[colon_pos] != ':') &&
!isspace (data[colon_pos]))
+ while ((colon_pos < frstat.st_size) && (data[colon_pos] != ':') &&
!isspace ( (unsigned char) data[colon_pos]))
colon_pos++;
if (colon_pos >= frstat.st_size)
@@ -1073,13 +1073,13 @@
return;
}
- if (isspace(data[colon_pos]))
+ if (isspace( (unsigned char) data[colon_pos]))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Syntax error in blacklist file at offset %llu, skipping
bytes.\n"),
(unsigned long long) colon_pos);
pos = colon_pos;
- while ((pos < frstat.st_size) && isspace (data[pos]))
+ while ((pos < frstat.st_size) && isspace ( (unsigned char) data[pos]))
pos++;
continue;
}
@@ -1104,13 +1104,13 @@
transport_name);
memcpy (&enc, &data[pos], sizeof (struct
GNUNET_CRYPTO_HashAsciiEncoded));
- if (!isspace (enc.encoding[sizeof (struct
GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
+ if (!isspace ( (unsigned char) enc.encoding[sizeof (struct
GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Syntax error in blacklist file at offset %llu,
skipping bytes.\n"),
(unsigned long long) pos);
pos++;
- while ((pos < frstat.st_size) && (!isspace (data[pos])))
+ while ((pos < frstat.st_size) && (!isspace ( (unsigned char)
data[pos])))
pos++;
GNUNET_free_non_null(transport_name);
continue;
@@ -1145,7 +1145,7 @@
}
pos = pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded);
GNUNET_free_non_null(transport_name);
- while ((pos < frstat.st_size) && isspace (data[pos]))
+ while ((pos < frstat.st_size) && isspace ( (unsigned char) data[pos]))
pos++;
}
GNUNET_free (data);
Modified: gnunet/src/util/configuration.c
===================================================================
--- gnunet/src/util/configuration.c 2010-06-13 09:50:07 UTC (rev 11719)
+++ gnunet/src/util/configuration.c 2010-06-13 10:34:46 UTC (rev 11720)
@@ -204,7 +204,7 @@
if (emptyline == 1)
continue;
/* remove tailing whitespace */
- for (i = strlen (line) - 1; (i >= 0) && (isspace (line[i])); i--)
+ for (i = strlen (line) - 1; (i >= 0) && (isspace ( (unsigned char)
line[i])); i--)
line[i] = '\0';
if (1 == sscanf (line, "@INLINE@ %191[^\n]", value))
{
@@ -223,7 +223,7 @@
/* tag = value */
/* Strip LF */
i = strlen (value) - 1;
- while ((i >= 0) && (isspace (value[i])))
+ while ((i >= 0) && (isspace ( (unsigned char) value[i])))
value[i--] = '\0';
/* remove quotes */
i = 0;
Modified: gnunet/src/util/program.c
===================================================================
--- gnunet/src/util/program.c 2010-06-13 09:50:07 UTC (rev 11719)
+++ gnunet/src/util/program.c 2010-06-13 10:34:46 UTC (rev 11720)
@@ -102,9 +102,9 @@
{
__const struct GNUNET_GETOPT_CommandLineOption *c1 = a1;
__const struct GNUNET_GETOPT_CommandLineOption *c2 = a2;
- if (toupper (c1->shortName) > toupper (c2->shortName))
+ if (toupper ( (unsigned char) c1->shortName) > toupper ( (unsigned char)
c2->shortName))
return 1;
- if (toupper (c1->shortName) < toupper (c2->shortName))
+ if (toupper ( (unsigned char) c1->shortName) < toupper ( (unsigned char)
c2->shortName))
return -1;
if (c1->shortName > c2->shortName)
return 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11720 - in gnunet/src: arm fs testing topology transport util,
gnunet <=