s3-perfcount: update to use new DLIST macros
authorAndrew Tridgell <tridge@samba.org>
Sat, 6 Feb 2010 01:41:39 +0000 (12:41 +1100)
committerJeremy Allison <jra@samba.org>
Wed, 10 Feb 2010 23:41:22 +0000 (15:41 -0800)
(cherry picked from commit a13b507f2d8be7f90c8872094cd0732926a6fcbb)

source3/modules/perfcount_onefs.c
source3/modules/perfcount_test.c

index 066a7f1fe4458ee58404304e9493d3369814df3a..75dc14555cd97b64d47790851ca3ab61d6d0abd2 100644 (file)
@@ -335,7 +335,7 @@ static void onefs_smb_statistics_end(struct smb_perfcount_data *pcd)
                        onefs_stat_debug(&tmp->iod), uid,
                        tmp->iod.in_bytes, tmp->iod.out_bytes));
 #endif
-               SAFE_FREE(tmp->prev);
+               SAFE_FREE(DLIST_PREV(tmp));
        }
 
        isc_cookie_init(&ctxt->iod.cookie, rem_addr, loc_addr, uid);
index b72ac9f7b5c238a09d518822f5ee9f8bd991b376..f9ea817127b7b25fc03441687d7714b7bba5441f 100644 (file)
@@ -179,8 +179,7 @@ static void perfcount_test_dump_counters(void)
        for (i=0; i < 256; i++) {
               for (head = g_list[i]; head != NULL; head = head->next) {
                       perfcount_test_dump_counter(head, 0);
-                      head->prev = NULL;
-                      SAFE_FREE(head->prev);
+                      SAFE_FREE(DLIST_PREV(head));
               }
               SAFE_FREE(head);
        }