summaryrefslogtreecommitdiff
path: root/src/arch.c
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2012-03-09 11:19:49 -0500
committerPaul Moore <pmoore@redhat.com>2012-03-09 11:53:26 -0500
commita617f35d34f3831ef09d7a8b47ec6eee0d5e880e (patch)
tree78bc7a97ccf66a5fe56bed29a7e20e2ae98d1059 /src/arch.c
parent5119c5880fbc5df41acfb2a448b0f24616cb92ec (diff)
downloadlibseccomp-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.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/arch.c b/src/arch.c
index 4ab25bc..8a570e5 100644
--- a/src/arch.c
+++ b/src/arch.c
@@ -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;
}
}
-