- Timestamp:
- Apr 4, 2013, 8:45:37 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_sub.c
r325 r429 252 252 static ssize_t sh_sub_write(int fd, const void *buf, size_t count) 253 253 { 254 char * mbuf = (char *) buf; 254 255 ssize_t rcount; 255 256 int ttl = 5; /* 0, 1, 9, 81, 729 millisec */ … … 258 259 do { 259 260 260 rcount = write(fd, buf, count);261 rcount = write(fd, mbuf, count); 261 262 if (rcount > 0) 262 263 { 263 count -= rcount; buf += rcount; --ttl;264 count -= rcount; mbuf += rcount; --ttl; 264 265 } 265 266 … … 354 355 static ssize_t sh_sub_read(int fd, void *buf, size_t count) 355 356 { 357 char * mbuf = (char *) buf; 356 358 ssize_t rcount; 357 359 int ttl = 5; /* 0, 1, 9, 81, 729 millisec */ … … 359 361 360 362 do { 361 rcount = read(fd, buf, count);363 rcount = read(fd, mbuf, count); 362 364 363 365 if (rcount > 0) 364 366 { 365 count -= rcount; buf += rcount; --ttl;367 count -= rcount; mbuf += rcount; --ttl; 366 368 } 367 369
Note:
See TracChangeset
for help on using the changeset viewer.