diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 12:38:10 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 12:38:10 +0000 |
commit | c87efef42f76c2ff0dcfad2842ab369beffd21de (patch) | |
tree | 0ded972bd95879c77ed8fae6c84d0657fbdba660 /libX11/src/LiHosts.c | |
parent | 1dad159fe09ac3a88b21b98544880e5ecc0e8d54 (diff) | |
download | vcxsrv-c87efef42f76c2ff0dcfad2842ab369beffd21de.tar.gz vcxsrv-c87efef42f76c2ff0dcfad2842ab369beffd21de.tar.bz2 vcxsrv-c87efef42f76c2ff0dcfad2842ab369beffd21de.zip |
Added libX11-1.2.2.tar.gz.
Diffstat (limited to 'libX11/src/LiHosts.c')
-rw-r--r-- | libX11/src/LiHosts.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libX11/src/LiHosts.c b/libX11/src/LiHosts.c index ebfb245ff..c1311da26 100644 --- a/libX11/src/LiHosts.c +++ b/libX11/src/LiHosts.c @@ -74,19 +74,19 @@ XHostAddress *XListHosts ( nbytes = reply.length << 2; /* compute number of bytes in reply */ op = outbuf = (XHostAddress *) - Xmalloc((unsigned) (nbytes + + Xmalloc((unsigned) (nbytes + (reply.nHosts * sizeof(XHostAddress)) + (reply.nHosts * sizeof(XServerInterpretedAddress)))); - if (! outbuf) { + if (! outbuf) { _XEatData(dpy, (unsigned long) nbytes); UnlockDisplay(dpy); SyncHandle(); return (XHostAddress *) NULL; } - sip = (XServerInterpretedAddress *) + sip = (XServerInterpretedAddress *) (((unsigned char *) outbuf) + (reply.nHosts * sizeof(XHostAddress))); - bp = buf = ((unsigned char *) sip) + bp = buf = ((unsigned char *) sip) + (reply.nHosts * sizeof(XServerInterpretedAddress)); _XRead (dpy, (char *) buf, nbytes); @@ -99,12 +99,12 @@ XHostAddress *XListHosts ( op->length = xhe.length; #else op->family = ((xHostEntry *) bp)->family; - op->length =((xHostEntry *) bp)->length; + op->length =((xHostEntry *) bp)->length; #endif if (op->family == FamilyServerInterpreted) { char *tp = (char *) (bp + SIZEOF(xHostEntry)); char *vp = memchr(tp, 0, op->length); - + if (vp != NULL) { sip->type = tp; sip->typelength = vp - tp; @@ -132,6 +132,6 @@ XHostAddress *XListHosts ( } - + |