Fix target of assignment not really an lvalue error

svn path=/trunk/; revision=29743
This commit is contained in:
Kovarththanan Rajaratnam 2009-09-06 12:27:32 +00:00
parent 571e69fdfa
commit 0e5a101815
2 changed files with 3 additions and 3 deletions

View File

@ -872,7 +872,7 @@ packet_list_resort(PacketList *packet_list)
if (record->visible_pos >= 0) {
g_assert(record->fdata->flags.passed_dfilter);
neworder[vis_idx] = record->visible_pos;
PACKET_LIST_RECORD_GET(packet_list->visible_rows, vis_idx) = record;
PACKET_LIST_RECORD_SET(packet_list->visible_rows, vis_idx, record);
record->visible_pos = vis_idx;
++vis_idx;
}

View File

@ -41,8 +41,8 @@ typedef struct _PacketListRecord PacketListRecord;
typedef struct _PacketList PacketList;
typedef struct _PacketListClass PacketListClass;
#define PACKET_LIST_RECORD_GET(rows, pos) ((PacketListRecord*) g_ptr_array_index((rows), (pos)))
#define PACKET_LIST_RECORD_SET(rows, pos, item) PACKET_LIST_RECORD_GET((rows), (pos)) = (item)
#define PACKET_LIST_RECORD_GET(rows, pos) ((PacketListRecord*) g_ptr_array_index((rows), (pos)))
#define PACKET_LIST_RECORD_SET(rows, pos, item) g_ptr_array_index((rows), (pos)) = (item)
#define PACKET_LIST_RECORD_APPEND(rows, item) g_ptr_array_add((rows), (item))
#define PACKET_LIST_RECORD_COUNT(rows) ((rows) ? (rows)->len : 0)
#define PACKET_LIST_RECORD_INDEX_VALID(rows, idx) ((rows) ? (((guint) (idx)) < (rows)->len) : FALSE)