mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
Convert NEW_DEFAULT anf NEW_MEMBER into static functions.
This commit is contained in:
25
parse.h
25
parse.h
@@ -148,31 +148,6 @@ struct defaults {
|
||||
struct defaults *prev, *next;
|
||||
};
|
||||
|
||||
/*
|
||||
* Allocate space for a defaults entry and populate it.
|
||||
*/
|
||||
#undef NEW_DEFAULT
|
||||
#define NEW_DEFAULT(r, v1, v2, o) do { \
|
||||
(r) = emalloc(sizeof(struct defaults)); \
|
||||
(r)->var = (v1); \
|
||||
(r)->val = (v2); \
|
||||
(r)->op = (o); \
|
||||
(r)->prev = (r); \
|
||||
(r)->next = NULL; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Allocate space for a member and populate it.
|
||||
*/
|
||||
#undef NEW_MEMBER
|
||||
#define NEW_MEMBER(r, n, t) do { \
|
||||
(r) = emalloc(sizeof(struct member)); \
|
||||
(r)->name = (n); \
|
||||
(r)->type = (t); \
|
||||
(r)->prev = (r); \
|
||||
(r)->next = NULL; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Append one queue (or single entry) to another using the
|
||||
* circular properties of the prev pointer to simplify the logic.
|
||||
|
Reference in New Issue
Block a user