Changeset 871281c for lib


Ignore:
Timestamp:
11/14/08 15:47:59 (13 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:
9b25f5f
Parents:
896ad39
Message:

Make sure NULL is defined.
Make sure stdio is included for printf
Use fprintf, not printf

Location:
lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lib/protocols_l2.c

    r29c8666 r871281c  
    44#include "libtrace_int.h"
    55#include <assert.h>
     6#include <stdlib.h>
    67
    78/* Returns the payload from 802.3 ethernet.  Type optionally returned in
     
    314315{
    315316        void *l;
    316         assert(linktype != -1);
     317        assert(linktype != ~0U);
    317318        switch(linktype) {
    318319                /* Packet Metadata headers, not layer2 headers */
  • lib/protocols_l3.c

    raa22b5b r871281c  
    33#include "protocols.h"
    44#include <assert.h>
     5#include <stdlib.h>
    56
    67libtrace_ip_t *trace_get_ip(libtrace_packet_t *packet)
  • lib/protocols_transport.c

    raa22b5b r871281c  
    22#include "protocols.h"
    33#include <assert.h>
     4#include <stdlib.h>
     5#include <stdio.h> // fprintf
    46
    57DLLEXPORT void *trace_get_transport(const libtrace_packet_t *packet,
     
    3739                       
    3840                default:
    39                         printf("unknown ethertype=%04x\n",ethertype);
     41                        fprintf(stderr,"unknown ethertype=%04x\n",ethertype);
    4042                        *proto=0;
    4143                        return NULL;
Note: See TracChangeset for help on using the changeset viewer.