aboutsummaryrefslogtreecommitdiff
path: root/src/util/service.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-06-23 14:23:25 +0000
committerChristian Grothoff <christian@grothoff.org>2010-06-23 14:23:25 +0000
commit539288eab5294b4c29c1d43cb6f085cc88ce077c (patch)
tree8fb1f40ea22bcde154d4cf36ee858b0b4ab08174 /src/util/service.c
parent503c232f343876114549031bab91f2d5025e8c1a (diff)
downloadgnunet-539288eab5294b4c29c1d43cb6f085cc88ce077c.tar.gz
gnunet-539288eab5294b4c29c1d43cb6f085cc88ce077c.zip
fix scanf
Diffstat (limited to 'src/util/service.c')
-rw-r--r--src/util/service.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/service.c b/src/util/service.c
index b45a736ae..44d72f376 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -1154,10 +1154,10 @@ setup_service (struct GNUNET_SERVICE_Context *sctx)
1154#ifndef MINGW 1154#ifndef MINGW
1155 errno = 0; 1155 errno = 0;
1156 if ( (NULL != (lpid = getenv ("LISTEN_PID"))) && 1156 if ( (NULL != (lpid = getenv ("LISTEN_PID"))) &&
1157 (1 == sscanf ("%u", lpid, &pid)) && 1157 (1 == sscanf (lpid, "%u", &pid)) &&
1158 (getpid () == (pid_t) pid) && 1158 (getpid () == (pid_t) pid) &&
1159 (NULL != (nfds = getenv ("LISTEN_FDS"))) && 1159 (NULL != (nfds = getenv ("LISTEN_FDS"))) &&
1160 (1 == sscanf ("%u", nfds, &cnt)) && 1160 (1 == sscanf (nfds, "%u", &cnt)) &&
1161 (cnt > 0) ) 1161 (cnt > 0) )
1162 { 1162 {
1163 sctx->lsocks = GNUNET_malloc (sizeof(struct GNUNET_NETWORK_Handle*) * (cnt+1)); 1163 sctx->lsocks = GNUNET_malloc (sizeof(struct GNUNET_NETWORK_Handle*) * (cnt+1));