Changeset eecda9f for lib


Ignore:
Timestamp:
09/18/06 23:10:56 (15 years ago)
Author:
Perry Lorier <perry@…>
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
Message:

Make splint happier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtraceio-zlib.c

    r85a79b0 reecda9f  
    1414        if (err>=0) {
    1515                /* successfully read <x> bytes */
    16                 return err;
     16                return (ssize_t)err;
    1717        }
    1818        switch(err) {
     
    3636{
    3737        libtrace_io_t *io = (libtrace_io_t*)malloc(sizeof(libtrace_io_t));
     38        if (io == NULL)
     39                return NULL;
    3840        io->file = gzdopen(fd,mode);
    3941        return io;
     
    4345{
    4446        libtrace_io_t *io = (libtrace_io_t*)malloc(sizeof(libtrace_io_t));
     47        if (io == NULL)
     48                return NULL;
    4549        io->file = gzopen(path,mode);
    4650        return io;
     
    5256void libtrace_io_close(libtrace_io_t *io)
    5357{
    54         gzclose(io->file);
     58        (void)gzclose(io->file);
    5559        io->file=NULL;
    5660        free(io);
     
    5963ssize_t libtrace_io_write(libtrace_io_t *io, const void *buf, size_t len)
    6064{
    61         return gzwrite(io->file,buf,len);
     65        return (ssize_t)gzwrite(io->file,buf,len);
    6266}
    6367
     
    6973ssize_t libtrace_io_tell(libtrace_io_t *io)
    7074{
    71         return gztell(io->file);
     75        return (ssize_t)gztell(io->file);
    7276}
Note: See TracChangeset for help on using the changeset viewer.