[NeoStats-Devel] [Commits] r2683 - trunk/lib/event

[email protected]
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: Mark
Date: Sun Jul 24 06:35:01 2005
New Revision: 2683

Modified:
   trunk/lib/event/buffer.c
Log:
libevent - fix CPP style comments and Win32 warnings

Modified: trunk/lib/event/buffer.c
==============================================================================
--- trunk/lib/event/buffer.c	(original)
+++ trunk/lib/event/buffer.c	Sun Jul 24 06:35:01 2005
@@ -164,7 +164,7 @@
 int
 evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen)
 {
-	int nread = datlen;
+	size_t nread = datlen;
 	if (nread >= buf->off)
 		nread = buf->off;
 
@@ -279,7 +279,7 @@
 	size_t oldoff = buf->off;
 	int n = EVBUFFER_MAX_READ;
 #ifdef WIN32
-	DWORD dwBytesRead;
+	/*DWORD dwBytesRead;*/
 #endif
 
 #ifndef WIN32
@@ -305,13 +305,13 @@
 	if (n == 0)
 		return (0);
 #else
-	n = recv( fd, p, howmuch, 0 ); //ReadFile((HANDLE)fd, p, howmuch, &dwBytesRead, NULL);
+	n = recv( fd, p, howmuch, 0 ); /*ReadFile((HANDLE)fd, p, howmuch, &dwBytesRead, NULL);*/
 	errno = GetLastError();
 	if (n == 0)
 		return (-1);
 	if (n == 0)
 		return (0);
-	//n = dwBytesRead;
+	/*n = dwBytesRead;*/
 #endif
 
 	buf->off += n;
@@ -328,7 +328,7 @@
 {
 	int n;
 #ifdef WIN32
-	DWORD dwBytesWritten;
+	/*DWORD dwBytesWritten;*/
 #endif
 
 #ifndef WIN32
@@ -339,12 +339,12 @@
 		return (0);
 #else
 	n = send( fd, buffer->buffer, buffer->off, 0 );
-//WriteFile((HANDLE)fd, buffer->buffer, buffer->off, &dwBytesWritten, NULL);
+	/*WriteFile((HANDLE)fd, buffer->buffer, buffer->off, &dwBytesWritten, NULL);*/
 	if (n == 0)
 		return (-1);
 	if (n == 0)
 		return (0);
-	//n = dwBytesWritten;
+	/*n = dwBytesWritten;*/
 #endif
 	evbuffer_drain(buffer, n);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.