- Timestamp:
- 09/18/06 23:10:56 (16 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- 279486e
- Parents:
- 755e794
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtraceio-zlib.c
r85a79b0 reecda9f 14 14 if (err>=0) { 15 15 /* successfully read <x> bytes */ 16 return err;16 return (ssize_t)err; 17 17 } 18 18 switch(err) { … … 36 36 { 37 37 libtrace_io_t *io = (libtrace_io_t*)malloc(sizeof(libtrace_io_t)); 38 if (io == NULL) 39 return NULL; 38 40 io->file = gzdopen(fd,mode); 39 41 return io; … … 43 45 { 44 46 libtrace_io_t *io = (libtrace_io_t*)malloc(sizeof(libtrace_io_t)); 47 if (io == NULL) 48 return NULL; 45 49 io->file = gzopen(path,mode); 46 50 return io; … … 52 56 void libtrace_io_close(libtrace_io_t *io) 53 57 { 54 gzclose(io->file);58 (void)gzclose(io->file); 55 59 io->file=NULL; 56 60 free(io); … … 59 63 ssize_t libtrace_io_write(libtrace_io_t *io, const void *buf, size_t len) 60 64 { 61 return gzwrite(io->file,buf,len);65 return (ssize_t)gzwrite(io->file,buf,len); 62 66 } 63 67 … … 69 73 ssize_t libtrace_io_tell(libtrace_io_t *io) 70 74 { 71 return gztell(io->file);75 return (ssize_t)gztell(io->file); 72 76 }
Note: See TracChangeset
for help on using the changeset viewer.