mirror of
https://github.com/reactos/reactos.git
synced 2025-06-27 22:29:42 +00:00
- Fix a few warnings
svn path=/trunk/; revision=25787
This commit is contained in:
parent
70f870bb70
commit
55ffc321dc
4 changed files with 8 additions and 8 deletions
6
reactos/lib/3rdparty/adns/src/check.c
vendored
6
reactos/lib/3rdparty/adns/src/check.c
vendored
|
@ -102,7 +102,7 @@ static void checkc_notcpbuf(adns_state ads) {
|
||||||
static void checkc_global(adns_state ads) {
|
static void checkc_global(adns_state ads) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
assert(ads->udpsocket >= 0);
|
assert(ads->udpsocket != INVALID_SOCKET);
|
||||||
|
|
||||||
for (i=0; i<ads->nsortlist; i++)
|
for (i=0; i<ads->nsortlist; i++)
|
||||||
assert(!(ads->sortlist[i].base.s_addr & ~ads->sortlist[i].mask.s_addr));
|
assert(!(ads->sortlist[i].base.s_addr & ~ads->sortlist[i].mask.s_addr));
|
||||||
|
@ -111,7 +111,7 @@ static void checkc_global(adns_state ads) {
|
||||||
|
|
||||||
switch (ads->tcpstate) {
|
switch (ads->tcpstate) {
|
||||||
case server_connecting:
|
case server_connecting:
|
||||||
assert(ads->tcpsocket >= 0);
|
assert(ads->tcpsocket != INVALID_SOCKET);
|
||||||
checkc_notcpbuf(ads);
|
checkc_notcpbuf(ads);
|
||||||
break;
|
break;
|
||||||
case server_disconnected:
|
case server_disconnected:
|
||||||
|
@ -120,7 +120,7 @@ static void checkc_global(adns_state ads) {
|
||||||
checkc_notcpbuf(ads);
|
checkc_notcpbuf(ads);
|
||||||
break;
|
break;
|
||||||
case server_ok:
|
case server_ok:
|
||||||
assert(ads->tcpsocket >= 0);
|
assert(ads->tcpsocket != INVALID_SOCKET);
|
||||||
assert(ads->tcprecv_skip <= ads->tcprecv.used);
|
assert(ads->tcprecv_skip <= ads->tcprecv.used);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
2
reactos/lib/3rdparty/adns/src/event.c
vendored
2
reactos/lib/3rdparty/adns/src/event.c
vendored
|
@ -114,7 +114,7 @@ void adns__tcp_tryconnect(adns_state ads, struct timeval now) {
|
||||||
ADNS_CLEAR_ERRNO
|
ADNS_CLEAR_ERRNO
|
||||||
fd= socket(AF_INET,SOCK_STREAM,proto->p_proto);
|
fd= socket(AF_INET,SOCK_STREAM,proto->p_proto);
|
||||||
ADNS_CAPTURE_ERRNO;
|
ADNS_CAPTURE_ERRNO;
|
||||||
if (fd<0) {
|
if (fd == INVALID_SOCKET) {
|
||||||
adns__diag(ads,-1,0,"cannot create TCP socket: %s",strerror(errno));
|
adns__diag(ads,-1,0,"cannot create TCP socket: %s",strerror(errno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
4
reactos/lib/3rdparty/adns/src/general.c
vendored
4
reactos/lib/3rdparty/adns/src/general.c
vendored
|
@ -254,7 +254,7 @@ static const struct sinfo {
|
||||||
SINFO( nodata, "No such data" )
|
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 adns_status *st= key;
|
||||||
const struct sinfo *si= elem;
|
const struct sinfo *si= elem;
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ static const struct stinfo {
|
||||||
STINFO( permfail )
|
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 adns_status *st= key;
|
||||||
const struct stinfo *sti= elem;
|
const struct stinfo *sti= elem;
|
||||||
|
|
||||||
|
|
4
reactos/lib/3rdparty/adns/src/setup.c
vendored
4
reactos/lib/3rdparty/adns/src/setup.c
vendored
|
@ -536,7 +536,7 @@ static int init_finish(adns_state ads) {
|
||||||
ADNS_CLEAR_ERRNO;
|
ADNS_CLEAR_ERRNO;
|
||||||
ads->udpsocket= socket(AF_INET,SOCK_DGRAM,proto->p_proto);
|
ads->udpsocket= socket(AF_INET,SOCK_DGRAM,proto->p_proto);
|
||||||
ADNS_CAPTURE_ERRNO;
|
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);
|
r= adns__setnonblock(ads,ads->udpsocket);
|
||||||
if (r) { r= errno; goto x_closeudp; }
|
if (r) { r= errno; goto x_closeudp; }
|
||||||
|
@ -682,7 +682,7 @@ void adns_finish(adns_state ads) {
|
||||||
else break;
|
else break;
|
||||||
}
|
}
|
||||||
adns_socket_close(ads->udpsocket);
|
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->tcpsend);
|
||||||
adns__vbuf_free(&ads->tcprecv);
|
adns__vbuf_free(&ads->tcprecv);
|
||||||
freesearchlist(ads);
|
freesearchlist(ads);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue