mirror of
https://github.com/samba-team/samba.git
synced 2025-03-10 12:58:35 +03:00
dlist: remove unneeded argument from DLIST_DEMOTE()
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit d6f5fc8c2d3db3daa2209850ef0487e822c7bb92)
This commit is contained in:
parent
9e06f33d39
commit
c3735243f7
@ -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); \
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user