(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/sctp_byte_graph_dlg.c) |
| |
| 1223 | | | static void set_arw_offsets(struct sctp_udata *u_data) |
| 1224 | | | { |
| 1225 | | | GPtrArray *s_array=NULL, *t_array=NULL; |
| 1226 | | | guint32 i, j=0; |
| 1227 | | | |
| 1228 | | | if (u_data->dir==1 && u_data->assoc->n_sack_chunks_ep1>0) |
| 1229 | | | { |
| 1230 | | | s_array=u_data->assoc->sort_sack1; |
| 1231 | | | t_array=u_data->assoc->sort_tsn1; |
| 1232 | | | insertion(s_array,u_data->assoc->n_sack_chunks_ep1); |
| 1233 | | | |
| 1234 | | | for (i=0; i<u_data->assoc->n_sack_chunks_ep1; i++) |
| 1235 | | | { |
| 1236 | | | while (((struct tsn_sort*)(g_ptr_array_index(s_array, i)))->tsnumber > ((struct tsn_sort*)(g_ptr_array_index(t_array, j)))->tsnumber)
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
|
| 1237 | | | { |
| 1238 | | | j++; |
| 1239 | | | } |
| 1240 | | | ((struct tsn_sort*)(g_ptr_array_index(s_array,i)))->offset = ((struct tsn_sort*)(g_ptr_array_index(t_array, j)))->offset
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
|
| 1241 | | | + ((struct tsn_sort*)(g_ptr_array_index(t_array, j)))->length;
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
|
| 1242 | | | } |
| 1243 | | | |
| 1244 | | | u_data->assoc->sort_sack1=s_array; |
| 1245 | | | } |
| 1246 | | | |
| 1247 | | | if (u_data->dir==2 && u_data->assoc->n_sack_chunks_ep2>0) |
| 1248 | | | { |
| 1249 | | | s_array=u_data->assoc->sort_sack2; |
| 1250 | | | t_array=u_data->assoc->sort_tsn2; |
| 1251 | | | insertion(s_array,u_data->assoc->n_sack_chunks_ep2); |
| 1252 | | | j=0; |
Useless Assignment
This code assigns the variable the same value it already had. |
|
| 1253 | | | for (i=0; i<u_data->assoc->n_sack_chunks_ep2; i++) |
| 1254 | | | { |
| 1255 | | | while (((struct tsn_sort*)(g_ptr_array_index(s_array, i)))->tsnumber > ((struct tsn_sort*)(g_ptr_array_index(t_array,j)))->tsnumber)
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
|
| 1256 | | | { |
| 1257 | | | j++; |
| 1258 | | | } |
| 1259 | | | ((struct tsn_sort*)(g_ptr_array_index(s_array, i)))->offset = ((struct tsn_sort*)(g_ptr_array_index(t_array, j)))->offset
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
|
| 1260 | | | + ((struct tsn_sort*)(g_ptr_array_index(t_array, j)))->length;
x /usr/include/glib-2.0/glib/garray.h |
| |
111 | #define g_ptr_array_index(array,index_) ((array)->pdata)[index_] |
| |
|
| 1261 | | | } |
| 1262 | | | u_data->assoc->sort_sack2=s_array; |
| 1263 | | | } |
| 1264 | | | } |
| |