diff options
author | Paul Moore <pmoore@redhat.com> | 2012-03-09 11:19:49 -0500 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2012-03-09 11:53:26 -0500 |
commit | a617f35d34f3831ef09d7a8b47ec6eee0d5e880e (patch) | |
tree | 78bc7a97ccf66a5fe56bed29a7e20e2ae98d1059 /src/arch.c | |
parent | 5119c5880fbc5df41acfb2a448b0f24616cb92ec (diff) | |
download | libseccomp-a617f35d34f3831ef09d7a8b47ec6eee0d5e880e.tar.gz |
arch: simplify the arch dependent code quite a bit
In the majority of the cases, we don't need to implement full
functions when a simple #define will work. We also probably don't
need to pass as many arguments as we are at present.
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'src/arch.c')
-rw-r--r-- | src/arch.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -66,9 +66,9 @@ int arch_arg_count_max(const struct arch_def *arch) { switch (arch->token) { case AUDIT_ARCH_I386: - return i386_arg_count_max(arch); + return i386_arg_count_max; case AUDIT_ARCH_X86_64: - return x86_64_arg_count_max(arch); + return x86_64_arg_count_max; default: return -EDOM; } @@ -88,9 +88,9 @@ int arch_arg_offset_lo(const struct arch_def *arch, unsigned int arg) { switch (arch->token) { case AUDIT_ARCH_I386: - return i386_arg_offset_lo(arch, arg); + return i386_arg_offset_lo(arg); case AUDIT_ARCH_X86_64: - return x86_64_arg_offset_lo(arch, arg); + return x86_64_arg_offset_lo(arg); default: return -EDOM; } @@ -110,7 +110,7 @@ int arch_arg_offset_hi(const struct arch_def *arch, unsigned int arg) { switch (arch->token) { case AUDIT_ARCH_X86_64: - return x86_64_arg_offset_hi(arch, arg); + return x86_64_arg_offset_hi(arg); default: return -EDOM; } @@ -129,9 +129,9 @@ int arch_arg_offset(const struct arch_def *arch, unsigned int arg) { switch (arch->token) { case AUDIT_ARCH_I386: - return i386_arg_offset(arch, arg); + return i386_arg_offset(arg); case AUDIT_ARCH_X86_64: - return x86_64_arg_offset(arch, arg); + return x86_64_arg_offset(arg); default: return -EDOM; } @@ -159,4 +159,3 @@ int arch_filter_rewrite(const struct arch_def *arch, return -EDOM; } } - |