~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to src/LiHosts.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-17 16:34:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090117163454-gaey3cd32xyavueo
Tags: 2:1.1.99.2-1build1
Fakesync with Debian, all previous Ubuntu changes are included
in the new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        nbytes = reply.length << 2;     /* compute number of bytes in reply */
75
75
 
76
76
        op = outbuf = (XHostAddress *)
77
 
            Xmalloc((unsigned) (nbytes + 
 
77
            Xmalloc((unsigned) (nbytes +
78
78
              (reply.nHosts * sizeof(XHostAddress)) +
79
79
              (reply.nHosts * sizeof(XServerInterpretedAddress))));
80
80
 
81
 
        if (! outbuf) { 
 
81
        if (! outbuf) {
82
82
            _XEatData(dpy, (unsigned long) nbytes);
83
83
            UnlockDisplay(dpy);
84
84
            SyncHandle();
85
85
            return (XHostAddress *) NULL;
86
86
        }
87
 
        sip = (XServerInterpretedAddress *) 
 
87
        sip = (XServerInterpretedAddress *)
88
88
         (((unsigned char  *) outbuf) + (reply.nHosts * sizeof(XHostAddress)));
89
 
        bp = buf = ((unsigned char  *) sip) 
 
89
        bp = buf = ((unsigned char  *) sip)
90
90
          + (reply.nHosts * sizeof(XServerInterpretedAddress));
91
91
 
92
92
        _XRead (dpy, (char *) buf, nbytes);
99
99
            op->length = xhe.length;
100
100
#else
101
101
            op->family = ((xHostEntry *) bp)->family;
102
 
            op->length =((xHostEntry *) bp)->length; 
 
102
            op->length =((xHostEntry *) bp)->length;
103
103
#endif
104
104
            if (op->family == FamilyServerInterpreted) {
105
105
                char *tp = (char *) (bp + SIZEOF(xHostEntry));
106
106
                char *vp = memchr(tp, 0, op->length);
107
 
                
 
107
 
108
108
                if (vp != NULL) {
109
109
                    sip->type = tp;
110
110
                    sip->typelength = vp - tp;
132
132
}
133
133
 
134
134
 
135
 
    
 
135
 
136
136
 
137
137