comparison cli-agentfwd.c @ 723:0fd32a552ea5

Fix a few compile warnings
author Matt Johnston <matt@ucc.asn.au>
date Sat, 23 Mar 2013 23:17:01 +0800
parents 5e8d84f3ee72
children f336d232fc63
comparison
equal deleted inserted replaced
722:4a274f47eabd 723:0fd32a552ea5
154 if (readlen > MAX_AGENT_REPLY) { 154 if (readlen > MAX_AGENT_REPLY) {
155 TRACE(("agent reply is too big")); 155 TRACE(("agent reply is too big"));
156 goto out; 156 goto out;
157 } 157 }
158 158
159 TRACE(("agent_request readlen is %d", readlen))
160
161 buf_resize(inbuf, readlen); 159 buf_resize(inbuf, readlen);
162 buf_setpos(inbuf, 0); 160 buf_setpos(inbuf, 0);
163 ret = atomicio(read, fd, buf_getwriteptr(inbuf, readlen), readlen); 161 ret = atomicio(read, fd, buf_getwriteptr(inbuf, readlen), readlen);
164 if ((size_t)ret != readlen) { 162 if ((size_t)ret != readlen) {
165 TRACE(("read of data failed for agent_request")) 163 TRACE(("read of data failed for agent_request"))
166 goto out; 164 goto out;
167 } 165 }
168 buf_incrwritepos(inbuf, readlen); 166 buf_incrwritepos(inbuf, readlen);
169 buf_setpos(inbuf, 0); 167 buf_setpos(inbuf, 0);
170 TRACE(("agent_request success, length %d", readlen))
171 168
172 out: 169 out:
173 if (payload) 170 if (payload)
174 buf_free(payload); 171 buf_free(payload);
175 172