"connect_topology_option_modifier",
&connect_topology_option_modifier_string))
{
- if (sscanf
+ if (SSCANF
(connect_topology_option_modifier_string, "%lf",
&connect_topology_option_modifier) != 1)
{
{
if (out[rpos] == '%')
{
- if (1 != sscanf (&out[rpos + 1], "%2X", &hx))
+ if (1 != SSCANF (&out[rpos + 1], "%2X", &hx))
{
GNUNET_free (out);
*emsg = GNUNET_strdup (_("`%' must be followed by HEX number"));
global_ret = 7;
goto cleanup;
}
- if ((1 != sscanf (argv[3], "%u", &p)) || (0 == p) || (0xFFFF < p))
+ if ((1 != SSCANF (argv[3], "%u", &p)) || (0 == p) || (0xFFFF < p))
{
fprintf (stderr, "Error parsing port value `%s'\n", argv[3]);
global_ret = 8;
#if HAVE_SOCKADDR_IN_SIN_LEN
sin_addr.sin_len = sizeof (sin_addr);
#endif
- if ((NULL == port_start) || (1 != sscanf (port_start, "%d", &port)) ||
+ if ((NULL == port_start) || (1 != SSCANF (port_start, "%d", &port)) ||
(-1 == inet_pton (AF_INET, mybuf, &sin_addr.sin_addr)))
{
/* should we restart gnunet-helper-nat-server? */
if (NULL == strstr (s, pstr))
return; /* skip */
if (1 !=
- sscanf (line,
+ SSCANF (line,
(mini->is_tcp) ? "%*u TCP %u->%*s:%*u %*s" :
"%*u UDP %u->%*s:%*u %*s", &nport))
return; /* skip */
*/
if ((NULL == (ipaddr = strstr (line, " "))) ||
(NULL == (pstr = strstr (ipaddr, ":"))) ||
- (1 != sscanf (pstr + 1, "%u", &port)))
+ (1 != SSCANF (pstr + 1, "%u", &port)))
{
return; /* skip line */
}
data[count] = '\0';
temphost = GNUNET_malloc (sizeof (struct GNUNET_TESTING_Host));
ret =
- sscanf (buf, "%a[a-zA-Z0-9]@%a[a-zA-Z0-9.]:%hd",
+ SSCANF (buf, "%a[a-zA-Z0-9]@%a[a-zA-Z0-9.]:%hd",
&temphost->username, &temphost->hostname, &temphost->port);
if (3 == ret)
{
"connect_topology_option_modifier",
&connect_topology_option_modifier_string))
{
- if (sscanf
+ if (SSCANF
(connect_topology_option_modifier_string, "%lf",
&connect_topology_option_modifier) != 1)
{
"connect_topology_option_modifier",
&connect_topology_option_modifier_string))
{
- if (sscanf
+ if (SSCANF
(connect_topology_option_modifier_string, "%lf",
&connect_topology_option_modifier) != 1)
{
"connect_topology_option_modifier",
&connect_topology_option_modifier_string))
{
- if (sscanf
+ if (SSCANF
(connect_topology_option_modifier_string, "%lf",
&connect_topology_option_modifier) != 1)
{
GNUNET_asprintf (&single_variable, "single_%s_per_host", section);
GNUNET_asprintf (&per_host_variable, "num_%s_per_host", section);
- if ((0 == strcmp (option, "PORT")) && (1 == sscanf (value, "%u", &ival)))
+ if ((0 == strcmp (option, "PORT")) && (1 == SSCANF (value, "%u", &ival)))
{
if ((ival != 0) &&
(GNUNET_YES !=
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PERCENTAGE",
&p_string))
{
- if (sscanf (p_string, "%lf", &logNModifier) != 1)
+ if (SSCANF (p_string, "%lf", &logNModifier) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PROBABILITY",
&p_string))
{
- if (sscanf (p_string, "%lf", &probability) != 1)
+ if (SSCANF (p_string, "%lf", &probability) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PERCENTAGE",
&p_string))
{
- if (sscanf (p_string, "%lf", &nat_percentage) != 1)
+ if (SSCANF (p_string, "%lf", &nat_percentage) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PERCENTAGE",
&p_string))
{
- if (sscanf (p_string, "%lf", &nat_percentage) != 1)
+ if (SSCANF (p_string, "%lf", &nat_percentage) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PERCENTAGE",
&p_string))
{
- if (sscanf (p_string, "%lf", &percentage) != 1)
+ if (SSCANF (p_string, "%lf", &percentage) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PROBABILITY",
&p_string))
{
- if (sscanf (p_string, "%lf", &probability) != 1)
+ if (SSCANF (p_string, "%lf", &probability) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
GNUNET_CONFIGURATION_get_value_string (pg->cfg, "TESTING", "PROBABILITY",
&p_string))
{
- if (sscanf (p_string, "%lf", &probability) != 1)
+ if (SSCANF (p_string, "%lf", &probability) != 1)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
("Invalid value `%s' for option `%s' in section `%s': expected float\n"),
data[count] = '\0';
temphost = GNUNET_malloc (sizeof (struct GNUNET_TESTING_Host));
ret =
- sscanf (buf, "%a[a-zA-Z0-9_]@%a[a-zA-Z0-9.]:%hd",
+ SSCANF (buf, "%a[a-zA-Z0-9_]@%a[a-zA-Z0-9.]:%hd",
&temphost->username, &temphost->hostname, &temphost->port);
if (3 == ret)
{
"connect_topology_option_modifier",
&temp_str))
{
- if (sscanf
+ if (SSCANF
(temp_str, "%lf", &pg_start_ctx->connect_topology_option_modifier) != 1)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
return 1;
}
if (6 !=
- sscanf (argv[3], "%x-%x-%x-%x-%x-%x", &temp[0], &temp[1], &temp[2],
+ SSCANF (argv[3], "%x-%x-%x-%x-%x-%x", &temp[0], &temp[1], &temp[2],
&temp[3], &temp[4], &temp[5]))
{
fprintf (stderr,
return 1;
}
if (6 !=
- sscanf (argv[2], "%x-%x-%x-%x-%x-%x", &temp[0], &temp[1], &temp[2],
+ SSCANF (argv[2], "%x-%x-%x-%x-%x-%x", &temp[0], &temp[1], &temp[2],
&temp[3], &temp[4], &temp[5]))
{
fprintf (stderr,
for (i = strlen (line) - 1; (i >= 0) && (isspace ((unsigned char) line[i]));
i--)
line[i] = '\0';
- if (1 == sscanf (line, "@INLINE@ %191[^\n]", value))
+ if (1 == SSCANF (line, "@INLINE@ %191[^\n]", value))
{
/* @INLINE@ value */
if (GNUNET_OK != GNUNET_CONFIGURATION_parse (cfg, value))
ret = GNUNET_SYSERR; /* failed to parse included config */
}
- else if (1 == sscanf (line, "[%99[^]]]", value))
+ else if (1 == SSCANF (line, "[%99[^]]]", value))
{
/* [value] */
GNUNET_free (section);
section = GNUNET_strdup (value);
}
- else if (2 == sscanf (line, " %63[^= ] = %191[^\n]", tag, value))
+ else if (2 == SSCANF (line, " %63[^= ] = %191[^\n]", tag, value))
{
/* tag = value */
/* Strip LF */
}
GNUNET_CONFIGURATION_set_value_string (cfg, section, tag, &value[i]);
}
- else if (1 == sscanf (line, " %63[^= ] =[^\n]", tag))
+ else if (1 == SSCANF (line, " %63[^= ] =[^\n]", tag))
{
/* tag = */
GNUNET_CONFIGURATION_set_value_string (cfg, section, tag, "");
while (NULL != fgets (line, sizeof (line), f))
{
if ((1 ==
- sscanf (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%s", dir)) &&
+ SSCANF (line, "%*x-%*x %*c%*c%*c%*c %*x %*2u:%*2u %*u%*[ ]%s", dir)) &&
(NULL != (lgu = strstr (dir, "libgnunetutil"))))
{
lgu[0] = '\0';
idx = -1;
slen = strlen (ns_uname);
- while ((slen > 0) && (1 != sscanf (&ns_uname[slen - 1], "-%u", &idx)))
+ while ((slen > 0) && (1 != SSCANF (&ns_uname[slen - 1], "-%u", &idx)))
slen--;
if (slen == 0)
return GNUNET_SYSERR;
while (i < count)
{
cnt =
- sscanf (&routeList[pos], "%u.%u.%u.%u/%u.%u.%u.%u;", &temps[0],
+ SSCANF (&routeList[pos], "%u.%u.%u.%u/%u.%u.%u.%u;", &temps[0],
&temps[1], &temps[2], &temps[3], &temps[4], &temps[5],
&temps[6], &temps[7]);
if (cnt == 8)
}
/* try second notation */
cnt =
- sscanf (&routeList[pos], "%u.%u.%u.%u/%u;", &temps[0], &temps[1],
+ SSCANF (&routeList[pos], "%u.%u.%u.%u/%u;", &temps[0], &temps[1],
&temps[2], &temps[3], &slash);
if (cnt == 5)
{
/* try third notation */
slash = 32;
cnt =
- sscanf (&routeList[pos], "%u.%u.%u.%u;", &temps[0], &temps[1],
+ SSCANF (&routeList[pos], "%u.%u.%u.%u;", &temps[0], &temps[1],
&temps[2], &temps[3]);
if (cnt == 4)
{
#ifndef MINGW
errno = 0;
if ((NULL != (lpid = getenv ("LISTEN_PID"))) &&
- (1 == sscanf (lpid, "%u", &pid)) && (getpid () == (pid_t) pid) &&
+ (1 == SSCANF (lpid, "%u", &pid)) && (getpid () == (pid_t) pid) &&
(NULL != (nfds = getenv ("LISTEN_FDS"))) &&
- (1 == sscanf (nfds, "%u", &cnt)) && (cnt > 0) && (cnt < FD_SETSIZE) &&
+ (1 == SSCANF (nfds, "%u", &cnt)) && (cnt > 0) && (cnt < FD_SETSIZE) &&
(cnt + 4 < FD_SETSIZE))
{
sctx->lsocks =
{
ret += last;
last = 0;
- if (1 != sscanf (tok, "%llu", &last))
+ if (1 != SSCANF (tok, "%llu", &last))
{
GNUNET_free (in);
return GNUNET_SYSERR; /* expected number */
{
ret += last;
last = 0;
- if (1 != sscanf (tok, "%llu", &last))
+ if (1 != SSCANF (tok, "%llu", &last))
{
GNUNET_free (in);
return GNUNET_SYSERR; /* expected number */
port_colon = strrchr (zt_addr, ':');
if (port_colon == NULL)
return GNUNET_SYSERR;
- ret = sscanf (port_colon, ":%u", &port);
+ ret = SSCANF (port_colon, ":%u", &port);
if (ret != 1 || port > 65535)
return GNUNET_SYSERR;
port_colon[0] = '\0';
if (addrlen < 9)
return GNUNET_SYSERR;
- cnt = sscanf (zt_addr, "%u.%u.%u.%u:%u", &temps[0], &temps[1], &temps[2], &temps[3], &port);
+ cnt = SSCANF (zt_addr, "%u.%u.%u.%u:%u", &temps[0], &temps[1], &temps[2], &temps[3], &port);
if (cnt != 5)
return GNUNET_SYSERR;