Author: janderwald
Date: Sun Feb 11 18:23:48 2007
New Revision: 25787
URL:
http://svn.reactos.org/svn/reactos?rev=25787&view=rev
Log:
- Fix a few warnings
Modified:
trunk/reactos/lib/3rdparty/adns/src/check.c
trunk/reactos/lib/3rdparty/adns/src/event.c
trunk/reactos/lib/3rdparty/adns/src/general.c
trunk/reactos/lib/3rdparty/adns/src/setup.c
Modified: trunk/reactos/lib/3rdparty/adns/src/check.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/adns/src/chec…
==============================================================================
--- trunk/reactos/lib/3rdparty/adns/src/check.c (original)
+++ trunk/reactos/lib/3rdparty/adns/src/check.c Sun Feb 11 18:23:48 2007
@@ -102,7 +102,7 @@
static void checkc_global(adns_state ads) {
int i;
- assert(ads->udpsocket >= 0);
+ assert(ads->udpsocket != INVALID_SOCKET);
for (i=0; i<ads->nsortlist; i++)
assert(!(ads->sortlist[i].base.s_addr & ~ads->sortlist[i].mask.s_addr));
@@ -111,7 +111,7 @@
switch (ads->tcpstate) {
case server_connecting:
- assert(ads->tcpsocket >= 0);
+ assert(ads->tcpsocket != INVALID_SOCKET);
checkc_notcpbuf(ads);
break;
case server_disconnected:
@@ -120,7 +120,7 @@
checkc_notcpbuf(ads);
break;
case server_ok:
- assert(ads->tcpsocket >= 0);
+ assert(ads->tcpsocket != INVALID_SOCKET);
assert(ads->tcprecv_skip <= ads->tcprecv.used);
break;
default:
Modified: trunk/reactos/lib/3rdparty/adns/src/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/adns/src/even…
==============================================================================
--- trunk/reactos/lib/3rdparty/adns/src/event.c (original)
+++ trunk/reactos/lib/3rdparty/adns/src/event.c Sun Feb 11 18:23:48 2007
@@ -114,7 +114,7 @@
ADNS_CLEAR_ERRNO
fd= socket(AF_INET,SOCK_STREAM,proto->p_proto);
ADNS_CAPTURE_ERRNO;
- if (fd<0) {
+ if (fd == INVALID_SOCKET) {
adns__diag(ads,-1,0,"cannot create TCP socket: %s",strerror(errno));
return;
}
Modified: trunk/reactos/lib/3rdparty/adns/src/general.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/adns/src/gene…
==============================================================================
--- trunk/reactos/lib/3rdparty/adns/src/general.c (original)
+++ trunk/reactos/lib/3rdparty/adns/src/general.c Sun Feb 11 18:23:48 2007
@@ -254,7 +254,7 @@
SINFO( nodata, "No such data"
)
};
-static int si_compar(const void *key, const void *elem) {
+static int __cdecl si_compar(const void *key, const void *elem) {
const adns_status *st= key;
const struct sinfo *si= elem;
@@ -295,7 +295,7 @@
STINFO( permfail )
};
-static int sti_compar(const void *key, const void *elem) {
+static int __cdecl sti_compar(const void *key, const void *elem) {
const adns_status *st= key;
const struct stinfo *sti= elem;
Modified: trunk/reactos/lib/3rdparty/adns/src/setup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/adns/src/setu…
==============================================================================
--- trunk/reactos/lib/3rdparty/adns/src/setup.c (original)
+++ trunk/reactos/lib/3rdparty/adns/src/setup.c Sun Feb 11 18:23:48 2007
@@ -536,7 +536,7 @@
ADNS_CLEAR_ERRNO;
ads->udpsocket= socket(AF_INET,SOCK_DGRAM,proto->p_proto);
ADNS_CAPTURE_ERRNO;
- if (ads->udpsocket<0) { r= errno; goto x_free; }
+ if (ads->udpsocket == INVALID_SOCKET) { r= errno; goto x_free; }
r= adns__setnonblock(ads,ads->udpsocket);
if (r) { r= errno; goto x_closeudp; }
@@ -682,7 +682,7 @@
else break;
}
adns_socket_close(ads->udpsocket);
- if (ads->tcpsocket >= 0) adns_socket_close(ads->tcpsocket);
+ if (ads->tcpsocket != INVALID_SOCKET) adns_socket_close(ads->tcpsocket);
adns__vbuf_free(&ads->tcpsend);
adns__vbuf_free(&ads->tcprecv);
freesearchlist(ads);