dlist: remove unneeded argument from DLIST_DEMOTE()
authorMichael Adam <obnox@samba.org>
Fri, 5 Feb 2016 10:52:36 +0000 (11:52 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 6 Feb 2016 20:48:17 +0000 (21:48 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/dlinklist.h
lib/util/tests/dlinklist.c
source3/lib/events.c
source3/smbd/posix_acls.c

index 316ba10ab7657816359906d892e2ef0f711261c9..f3528a3cfef090b0f6108de5e4d20e32557cd978 100644 (file)
@@ -150,9 +150,8 @@ do { \
 
 /*
    demote an element to the end of a list.
-   Note that 'type' is ignored
 */
-#define DLIST_DEMOTE(list, p, type)                    \
+#define DLIST_DEMOTE(list, p) \
 do { \
        DLIST_REMOVE(list, p); \
        DLIST_ADD_END(list, p); \
index 462f4a7137e398bad008fe4d4f1ccdcb08a26e75..f743607f0f1c7c6901a1f7c944ee22ead7e18f08 100644 (file)
@@ -87,7 +87,7 @@ static bool torture_local_dlinklist_simple(struct torture_context *tctx)
        torture_assert(tctx, el2->next->next == el, "3rd in list");
 
        torture_comment(tctx, "check DLIST_DEMOTE\n");
-       DLIST_DEMOTE(l1, el, NULL);
+       DLIST_DEMOTE(l1, el);
        torture_assert(tctx, el->next == NULL, "last in list");
        torture_assert(tctx, el2->prev == el, "backlink from head");
 
index 0bc56e454add8445782f95c1b94746218f19791c..2e862cada3fb8f5c15a40b5ee87af69ccf09c3c7 100644 (file)
@@ -253,7 +253,7 @@ bool run_events_poll(struct tevent_context *ev, int pollrtn,
                        flags |= TEVENT_FD_WRITE;
                }
                if (flags & fde->flags) {
-                       DLIST_DEMOTE(ev->fd_events, fde, struct tevent_fd);
+                       DLIST_DEMOTE(ev->fd_events, fde);
                        fde->handler(ev, fde, flags, fde->private_data);
                        return true;
                }
index 1f2380bf3dbc9b32c10a479352783539cb6c6dfd..660c0e4e0d3a073a151005fdfc6804bfc55c9a7c 100644 (file)
@@ -2319,7 +2319,7 @@ static void process_deny_list(connection_struct *conn, canon_ace **pp_ace_list )
 
                        curr_ace->attr = ALLOW_ACE;
                        curr_ace->perms = (mode_t)0;
-                       DLIST_DEMOTE(ace_list, curr_ace, canon_ace *);
+                       DLIST_DEMOTE(ace_list, curr_ace);
                        continue;
                }
 
@@ -2344,7 +2344,7 @@ static void process_deny_list(connection_struct *conn, canon_ace **pp_ace_list )
 
                curr_ace->attr = ALLOW_ACE;
                curr_ace->perms = (new_perms & ~curr_ace->perms);
-               DLIST_DEMOTE(ace_list, curr_ace, canon_ace *);
+               DLIST_DEMOTE(ace_list, curr_ace);
        }
 
        /* Pass 3 above - deal with deny group entries. */
@@ -2391,7 +2391,7 @@ static void process_deny_list(connection_struct *conn, canon_ace **pp_ace_list )
                        curr_ace->perms = allow_everyone_p->perms & ~curr_ace->perms;
                else
                        curr_ace->perms = (mode_t)0;
-               DLIST_DEMOTE(ace_list, curr_ace, canon_ace *);
+               DLIST_DEMOTE(ace_list, curr_ace);
        }
 
        /* Doing this fourth pass allows Windows semantics to be layered
@@ -2589,7 +2589,7 @@ static void arrange_posix_perms(const char *filename, canon_ace **pp_list_head)
        }
 
        if (other_ace) {
-               DLIST_DEMOTE(l_head, other_ace, canon_ace *);
+               DLIST_DEMOTE(l_head, other_ace);
        }
 
        /* We have probably changed the head of the list. */