diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-11-10 07:23:39 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-11-10 07:23:39 +0000 |
commit | 5dea7ed777362d7eff2e23925ba13e7d669d74a2 (patch) | |
tree | 6bb39b23a80a9af4ab206bfcd6ec753066bc27f6 /libsandbox/wrapper-funcs/unlink.c | |
parent | scripts: strip whitespace (diff) | |
download | sandbox-5dea7ed777362d7eff2e23925ba13e7d669d74a2.tar.gz sandbox-5dea7ed777362d7eff2e23925ba13e7d669d74a2.tar.bz2 sandbox-5dea7ed777362d7eff2e23925ba13e7d669d74a2.zip |
libsandbox: break function args out into WRAPPER_ARGS and func name into STRING_NAME
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox/wrapper-funcs/unlink.c')
-rw-r--r-- | libsandbox/wrapper-funcs/unlink.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libsandbox/wrapper-funcs/unlink.c b/libsandbox/wrapper-funcs/unlink.c index a8570ce..39de69e 100644 --- a/libsandbox/wrapper-funcs/unlink.c +++ b/libsandbox/wrapper-funcs/unlink.c @@ -1,16 +1,15 @@ /* - * unlink.c - * * unlink() wrapper. * * Copyright 1999-2008 Gentoo Foundation * Licensed under the GPL-2 */ -extern int EXTERN_NAME(const char *); -static int (*WRAPPER_TRUE_NAME) (const char *) = NULL; +#define WRAPPER_ARGS const char *pathname +extern int EXTERN_NAME(WRAPPER_ARGS); +static int (*WRAPPER_TRUE_NAME)(WRAPPER_ARGS) = NULL; -int WRAPPER_NAME(const char *pathname) +int WRAPPER_NAME(WRAPPER_ARGS) { int result = -1, old_errno = errno; char canonic[SB_PATH_MAX]; @@ -30,7 +29,7 @@ int WRAPPER_NAME(const char *pathname) } errno = old_errno; - if FUNCTION_SANDBOX_SAFE("unlink", pathname) { + if FUNCTION_SANDBOX_SAFE(STRING_NAME, pathname) { check_dlsym(WRAPPER_TRUE_NAME, WRAPPER_SYMNAME, WRAPPER_SYMVER); result = WRAPPER_TRUE_NAME(pathname); |