From 095130bf72e0641b2a85a888e716183469c22c83 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Tue, 12 Aug 2008 21:31:31 +0000 Subject: [PATCH] Update copyrights and fix style(9). --- sys/amd64/amd64/bpf_jit_machdep.c | 16 ++++++++-------- sys/amd64/amd64/bpf_jit_machdep.h | 4 ++-- sys/i386/i386/bpf_jit_machdep.c | 20 ++++++++++---------- sys/i386/i386/bpf_jit_machdep.h | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/amd64/amd64/bpf_jit_machdep.c b/sys/amd64/amd64/bpf_jit_machdep.c index 08e84f4963f1..b20c433fbc0e 100644 --- a/sys/amd64/amd64/bpf_jit_machdep.c +++ b/sys/amd64/amd64/bpf_jit_machdep.c @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2002 - 2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 Jung-uk Kim + * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) + * Copyright (C) 2005-2008 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -105,13 +105,13 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) /* Do not compile an empty filter. */ if (nins == 0) - return NULL; + return (NULL); /* Allocate the reference table for the jumps */ stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int), M_BPFJIT, M_NOWAIT); if (stream.refs == NULL) - return NULL; + return (NULL); /* Reset the reference table */ for (i = 0; i < nins + 1; i++) @@ -141,7 +141,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) switch (ins->code) { default: - return NULL; + return (NULL); case BPF_RET|BPF_K: MOVid(ins->k, EAX); @@ -246,7 +246,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) RET(); ZEROrd(EDX); MOVobb(RBX, RCX, DL); - ANDib(0xf, DL); + ANDib(0x0f, DL); SHLib(2, EDX); break; @@ -464,7 +464,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); if (stream.ibuf == NULL) { free(stream.refs, M_BPFJIT); - return NULL; + return (NULL); } /* @@ -488,5 +488,5 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) */ free(stream.refs, M_BPFJIT); - return (bpf_filter_func)stream.ibuf; + return ((bpf_filter_func)stream.ibuf); } diff --git a/sys/amd64/amd64/bpf_jit_machdep.h b/sys/amd64/amd64/bpf_jit_machdep.h index 6d77c95b5723..ac2ae2b483d0 100644 --- a/sys/amd64/amd64/bpf_jit_machdep.h +++ b/sys/amd64/amd64/bpf_jit_machdep.h @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2002 - 2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 Jung-uk Kim + * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) + * Copyright (C) 2005-2008 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/i386/i386/bpf_jit_machdep.c b/sys/i386/i386/bpf_jit_machdep.c index 4a33464e92a0..5e3161b5cf90 100644 --- a/sys/i386/i386/bpf_jit_machdep.c +++ b/sys/i386/i386/bpf_jit_machdep.c @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2002 - 2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 Jung-uk Kim + * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) + * Copyright (C) 2005-2008 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -105,13 +105,13 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) /* Do not compile an empty filter. */ if (nins == 0) - return NULL; + return (NULL); /* Allocate the reference table for the jumps */ stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int), M_BPFJIT, M_NOWAIT); if (stream.refs == NULL) - return NULL; + return (NULL); /* Reset the reference table */ for (i = 0; i < nins + 1; i++) @@ -144,7 +144,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) switch (ins->code) { default: - return NULL; + return (NULL); case BPF_RET|BPF_K: MOVid(ins->k, EAX); @@ -204,11 +204,11 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) break; case BPF_LD|BPF_W|BPF_LEN: - MOVodd(0xc, EBP, EAX); + MOVodd(12, EBP, EAX); break; case BPF_LDX|BPF_W|BPF_LEN: - MOVodd(0xc, EBP, EDX); + MOVodd(12, EBP, EDX); break; case BPF_LD|BPF_W|BPF_IND: @@ -267,7 +267,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) LEAVE_RET(); ZEROrd(EDX); MOVobb(EBX, ECX, DL); - ANDib(0xf, DL); + ANDib(0x0f, DL); SHLib(2, EDX); break; @@ -487,7 +487,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); if (stream.ibuf == NULL) { free(stream.refs, M_BPFJIT); - return NULL; + return (NULL); } /* @@ -511,5 +511,5 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) */ free(stream.refs, M_BPFJIT); - return (bpf_filter_func)stream.ibuf; + return ((bpf_filter_func)stream.ibuf); } diff --git a/sys/i386/i386/bpf_jit_machdep.h b/sys/i386/i386/bpf_jit_machdep.h index 4d6cb401219f..1e31bec3a2f6 100644 --- a/sys/i386/i386/bpf_jit_machdep.h +++ b/sys/i386/i386/bpf_jit_machdep.h @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2002 - 2003 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 Jung-uk Kim + * Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy) + * Copyright (C) 2005-2008 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without