Changeset 5fb2251 for lib/fifo.c


Ignore:
Timestamp:
02/28/06 10:37:24 (16 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:
c26ca86
Parents:
d8f02df
Message:

Cleanups
Changed fifo to use a more portable MIN() to get rid of some more warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/fifo.c

    rd8f02df r5fb2251  
    6464};
    6565
    66 #define MIN(a,b) ({ int _a = a; int _b = b; (_a < _b) ? _a : _b; })
    67 
     66/* This MIN is more generic but not as portable
     67 * #define MIN(a,b) ({ int _a = a; int _b = b; (_a < _b) ? _a : _b; })
     68 */
     69#define MIN(a,b) ((a)<(b)?(a):(b))
    6870
    6971static char *tracefifo_stat_buffer = 0;
     
    207209static int tracefifo_read_generic(struct tracefifo_t *fifo, void *buffer, size_t len, enum which_t which, char update) {
    208210        size_t oldptr;
    209         int lenleft;
     211        size_t lenleft;
    210212        int size;
    211213        assert(fifo);
     
    232234int tracefifo_write(struct tracefifo_t *fifo, void *buffer, size_t len) {
    233235        int lenleft;
    234         int size;
     236        size_t size;
    235237        assert(fifo);
    236238        assert(buffer);
Note: See TracChangeset for help on using the changeset viewer.