Changeset 1299


Ignore:
Timestamp:
Oct 4, 2009, 6:01:46 PM (9 years ago)
Author:
Daniel Kahn Gillmor
Message:

sendfiletester: only print the errors if sendfile actually fails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/sendfile/sendfiletester.c

    r1234 r1299  
    134134    ret = sendfile(b, a, &offset, statbuf.st_size);
    135135
    136     snprintf(msg, sizeof(msg), "whoops: %lu ", offset);
    137     perror(msg);
     136    if (ret < 0) {
     137      snprintf(msg, sizeof(msg), "whoops: %lu ", offset);
     138      perror(msg);
     139    }
    138140    return ret;
    139141}
Note: See TracChangeset for help on using the changeset viewer.