move some variable declarations to the start of the block.
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 9 Mar 2007 20:02:25 +0000 (20:02 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 9 Mar 2007 20:02:25 +0000 (20:02 +0000)
many compilers do not support the nonstandard feature to declare variables in the middle of a block.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21012 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-dcp-etsi.c

index 349704582288eb26187d9013ee7feebb52059a7a..db396fdb149251ef3986ad8ee8e26d025dc964ea 100644 (file)
@@ -257,15 +257,18 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
                                            NULL, tree);
   else {
     guint fragments=0;
+    guint32 *got;
+    fragment_data *fd;
+    fragment_data *fd_head;
+
       if(tree)
         proto_tree_add_text (tree, tvb, 0, -1, "want %d, got %d need %d",
         fcount, fragments, rx_min
         );
-    guint32 *got = ep_alloc(fcount*sizeof(guint32));
+    got = ep_alloc(fcount*sizeof(guint32));
 
        /* make a list of the findex (offset) numbers of the fragments we have */
-    fragment_data *fd = fragment_get(pinfo, seq, dcp_fragment_table);
-    fragment_data *fd_head;
+    fd = fragment_get(pinfo, seq, dcp_fragment_table);
        for (fd_head = fd; fd_head != NULL; fd_head = fd_head->next) {
       if(fd_head->data) {
         got[fragments++] = fd_head->offset; /* this is the findex of the fragment */