2
0
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:
Todd C. Miller
2007-08-31 17:56:30 +00:00
parent 10e5d4e708
commit d56d0b1155
2 changed files with 61 additions and 48 deletions

25
parse.h
View File

@@ -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.