[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11684 - libmicrohttpd/src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11684 - libmicrohttpd/src/daemon |
Date: |
Sat, 12 Jun 2010 00:56:15 +0200 |
Author: grothoff
Date: 2010-06-12 00:56:15 +0200 (Sat, 12 Jun 2010)
New Revision: 11684
Modified:
libmicrohttpd/src/daemon/daemon.c
libmicrohttpd/src/daemon/postprocessor.c
Log:
reduce strstr calls by one
Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c 2010-06-11 22:47:11 UTC (rev 11683)
+++ libmicrohttpd/src/daemon/daemon.c 2010-06-11 22:56:15 UTC (rev 11684)
@@ -466,8 +466,7 @@
FD_SET (fd, read_fd_set);
/* update max file descriptor */
- if ( (NULL != max_fd) &&
- ((*max_fd) < fd) )
+ if ((*max_fd) < fd)
*max_fd = fd;
con_itr = daemon->connections;
Modified: libmicrohttpd/src/daemon/postprocessor.c
===================================================================
--- libmicrohttpd/src/daemon/postprocessor.c 2010-06-11 22:47:11 UTC (rev
11683)
+++ libmicrohttpd/src/daemon/postprocessor.c 2010-06-11 22:56:15 UTC (rev
11684)
@@ -273,10 +273,10 @@
boundary =
&encoding[strlen (MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA)];
/* Q: should this be "strcasestr"? */
- if (NULL != strstr (boundary, "boundary="))
- boundary = strstr (boundary, "boundary=") + strlen ("boundary=");
- else
- return NULL; /* failed to determine boundary */
+ boundary = strstr (boundary, "boundary=");
+ if (NULL == boundary)
+ return NULL; /* failed to determine boundary */
+ boundary += strlen ("boundary=");
blen = strlen (boundary);
if ((blen == 0) || (blen * 2 + 2 > buffer_size))
return NULL; /* (will be) out of memory or invalid boundary
*/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11684 - libmicrohttpd/src/daemon,
gnunet <=