Changeset 429 for trunk/src


Ignore:
Timestamp:
Apr 4, 2013, 8:45:37 PM (12 years ago)
Author:
katerina
Message:

Fix for ticket #336 (compile error on HP-UX)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_sub.c

    r325 r429  
    252252static ssize_t sh_sub_write(int fd, const void *buf, size_t count)
    253253{
     254  char * mbuf = (char *) buf;
    254255  ssize_t rcount;
    255256  int ttl = 5; /* 0, 1, 9, 81, 729 millisec */
     
    258259  do {
    259260
    260     rcount = write(fd, buf, count);
     261    rcount = write(fd, mbuf, count);
    261262    if (rcount > 0)
    262263      {
    263         count -= rcount; buf += rcount; --ttl;
     264        count -= rcount; mbuf += rcount; --ttl;
    264265      }
    265266
     
    354355static ssize_t sh_sub_read(int fd, void *buf, size_t count)
    355356{
     357  char * mbuf = (char *) buf;
    356358  ssize_t rcount;
    357359  int ttl = 5; /* 0, 1, 9, 81, 729 millisec */
     
    359361
    360362  do {
    361     rcount = read(fd, buf, count);
     363    rcount = read(fd, mbuf, count);
    362364
    363365    if (rcount > 0)
    364366      {
    365         count -= rcount; buf += rcount; --ttl;
     367        count -= rcount; mbuf += rcount; --ttl;
    366368      }
    367369
Note: See TracChangeset for help on using the changeset viewer.