Changeset 1340

Show
Ignore:
Timestamp:
02/04/08 16:35:39 (9 months ago)
Author:
spa1
Message:
  • Fixing more variables that aren't declared at the beginning of a code block
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/protocols_l2.c

    r1314 r1340  
    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 
  • trunk/lib/protocols_pktmeta.c

    r1314 r1340  
    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