diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-06 01:44:06 +0700 |
---|---|---|
committer | Mikhail Gusarov <dottedmag@dottedmag.net> | 2010-05-13 00:22:37 +0700 |
commit | 3f3ff971ecff9936cebafc813af9193b97bba89c (patch) | |
tree | fdbbad794a42488b7ffe41eed7aba4e498335f55 /os/mitauth.c | |
parent | 96c7ab27c383ec767f62a7a11e5fd76f86363fbc (diff) |
Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.
X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'os/mitauth.c')
-rw-r--r-- | os/mitauth.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/os/mitauth.c b/os/mitauth.c index 1a26dcea4..4b8f6e978 100644 --- a/os/mitauth.c +++ b/os/mitauth.c @@ -55,12 +55,12 @@ MitAddCookie ( { struct auth *new; - new = xalloc (sizeof (struct auth)); + new = malloc(sizeof (struct auth)); if (!new) return 0; - new->data = xalloc ((unsigned) data_length); + new->data = malloc((unsigned) data_length); if (!new->data) { - xfree(new); + free(new); return 0; } new->next = mit_auth; @@ -96,8 +96,8 @@ MitResetCookie (void) for (auth = mit_auth; auth; auth=next) { next = auth->next; - xfree (auth->data); - xfree (auth); + free(auth->data); + free(auth); } mit_auth = 0; return 0; @@ -152,8 +152,8 @@ MitRemoveCookie ( prev->next = auth->next; else mit_auth = auth->next; - xfree (auth->data); - xfree (auth); + free(auth->data); + free(auth); return 1; } } |