Commit 8772fbd6 8772fbd6f69aab253920bb2802438867d3cf501a by Sergey Poznyakoff

(internal_icvt_read,copy_pass): Fixed mistyped conditions.

1 parent 6d3ffdf3
...@@ -138,7 +138,7 @@ internal_icvt_read (stream_t stream, char *optr, size_t osize, size_t *pnbytes) ...@@ -138,7 +138,7 @@ internal_icvt_read (stream_t stream, char *optr, size_t osize, size_t *pnbytes)
138 } 138 }
139 else if (nbytes == 0) 139 else if (nbytes == 0)
140 { 140 {
141 if (*pnbytes) 141 if (pnbytes)
142 *pnbytes = 0; 142 *pnbytes = 0;
143 return 0; 143 return 0;
144 } 144 }
...@@ -232,7 +232,7 @@ internal_icvt_read (stream_t stream, char *optr, size_t osize, size_t *pnbytes) ...@@ -232,7 +232,7 @@ internal_icvt_read (stream_t stream, char *optr, size_t osize, size_t *pnbytes)
232 return MU_ERR_FAILURE; 232 return MU_ERR_FAILURE;
233 } 233 }
234 234
235 if (*pnbytes) 235 if (pnbytes)
236 *pnbytes = ob - optr; 236 *pnbytes = ob - optr;
237 return 0; 237 return 0;
238 } 238 }
...@@ -311,7 +311,7 @@ copy_pass (struct icvt_stream *s, char *optr, size_t osize, size_t *pnbytes) ...@@ -311,7 +311,7 @@ copy_pass (struct icvt_stream *s, char *optr, size_t osize, size_t *pnbytes)
311 s->bufpos -= sz; 311 s->bufpos -= sz;
312 if (s->bufpos) 312 if (s->bufpos)
313 memmove (s->buf, s->buf + sz, s->bufpos); 313 memmove (s->buf, s->buf + sz, s->bufpos);
314 if (*pnbytes) 314 if (pnbytes)
315 *pnbytes = sz; 315 *pnbytes = sz;
316 return 0; 316 return 0;
317 } 317 }
...@@ -324,7 +324,7 @@ copy_pass (struct icvt_stream *s, char *optr, size_t osize, size_t *pnbytes) ...@@ -324,7 +324,7 @@ copy_pass (struct icvt_stream *s, char *optr, size_t osize, size_t *pnbytes)
324 if (s->bufpos == 0) 324 if (s->bufpos == 0)
325 return MU_ERR_FAILURE; 325 return MU_ERR_FAILURE;
326 } 326 }
327 if (*pnbytes) 327 if (pnbytes)
328 *pnbytes = nbytes; 328 *pnbytes = nbytes;
329 return 0; 329 return 0;
330 } 330 }
......