Update copyrights and fix style(9).

This commit is contained in:
Jung-uk Kim 2008-08-12 21:31:31 +00:00
parent ded7d39cb9
commit 095130bf72
4 changed files with 22 additions and 22 deletions

View File

@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002 - 2003 NetGroup, Politecnico di Torino (Italy)
* Copyright (c) 2005 Jung-uk Kim <jkim@FreeBSD.org>
* Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy)
* Copyright (C) 2005-2008 Jung-uk Kim <jkim@FreeBSD.org>
* 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);
}

View File

@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002 - 2003 NetGroup, Politecnico di Torino (Italy)
* Copyright (c) 2005 Jung-uk Kim <jkim@FreeBSD.org>
* Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy)
* Copyright (C) 2005-2008 Jung-uk Kim <jkim@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002 - 2003 NetGroup, Politecnico di Torino (Italy)
* Copyright (c) 2005 Jung-uk Kim <jkim@FreeBSD.org>
* Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy)
* Copyright (C) 2005-2008 Jung-uk Kim <jkim@FreeBSD.org>
* 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);
}

View File

@ -1,6 +1,6 @@
/*-
* Copyright (c) 2002 - 2003 NetGroup, Politecnico di Torino (Italy)
* Copyright (c) 2005 Jung-uk Kim <jkim@FreeBSD.org>
* Copyright (C) 2002-2003 NetGroup, Politecnico di Torino (Italy)
* Copyright (C) 2005-2008 Jung-uk Kim <jkim@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without