Changeset 3ac4bf7


Ignore:
Timestamp:
04/02/08 16:35:39 (14 years ago)
Author:
Shane Alcock <salcock@…>
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:
87d7ab9
Parents:
dd1217b
Message:
  • Fixing more variables that aren't declared at the beginning of a code block
Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/protocols_l2.c

    r411666a r3ac4bf7  
    221221{
    222222        uint32_t dummyrem;
     223        void *meta = NULL;
    223224       
    224225        assert(packet != NULL);
     
    228229                remaining = &dummyrem;
    229230       
    230         void *meta = trace_get_packet_meta(packet, linktype, remaining);
     231        meta = trace_get_packet_meta(packet, linktype, remaining);
    231232
    232233        /* If there are no meta-data headers, we just return the start of the
  • lib/protocols_pktmeta.c

    r411666a r3ac4bf7  
    9090{
    9191        uint32_t dummyrem;
    92 
     92        void *pktbuf = NULL;
    9393        assert(packet != NULL);
    9494        assert(linktype != NULL);
     
    9797                remaining = &dummyrem;
    9898       
    99         void *pktbuf = trace_get_packet_buffer(packet, linktype, remaining);
     99        pktbuf = trace_get_packet_buffer(packet, linktype, remaining);
    100100        switch (*linktype) {
    101101                case TRACE_TYPE_LINUX_SLL:
     
    182182static
    183183uint8_t *get_source_mac_from_wifi(void *wifi) {
     184        struct libtrace_80211_t *w;
    184185        if (wifi == NULL) return NULL;
    185         struct libtrace_80211_t *w = (struct libtrace_80211_t *) wifi;
     186        w = (struct libtrace_80211_t *) wifi;
    186187       
    187188        /* If the frame is of type CTRL */
     
    242243        libtrace_linktype_t linktype;
    243244        uint32_t remaining;
    244 
     245        libtrace_80211_t *wifi;
     246        libtrace_ether_t *ethptr;
     247       
    245248        link = trace_get_layer2(packet,&linktype,&remaining);
    246249
    247         libtrace_80211_t *wifi;
    248         libtrace_ether_t *ethptr = (libtrace_ether_t*)link;
     250        ethptr = (libtrace_ether_t*)link;
    249251
    250252
Note: See TracChangeset for help on using the changeset viewer.