Skip to content

Commit

Permalink
KNF, remove trailing whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjc committed Nov 29, 2002
1 parent a57ace0 commit 47d5cec
Show file tree
Hide file tree
Showing 27 changed files with 227 additions and 227 deletions.
16 changes: 8 additions & 8 deletions kame/sys/altq/altq_afmap.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: altq_afmap.c,v 1.8 2002/04/03 05:38:49 kjc Exp $ */
/* $KAME: altq_afmap.c,v 1.9 2002/11/29 04:36:22 kjc Exp $ */

/*
* Copyright (C) 1997-2002
Expand Down Expand Up @@ -81,7 +81,7 @@ afm_alloc(ifp)
struct ifnet *ifp;
{
struct afm_head *head;

MALLOC(head, struct afm_head *, sizeof(struct afm_head),
M_DEVBUF, M_WAITOK);
if (head == NULL)
Expand All @@ -92,10 +92,10 @@ afm_alloc(ifp)
LIST_INIT(&head->afh_head);

head->afh_ifp = ifp;

/* add this afm_head to the chain */
LIST_INSERT_HEAD(&afhead_chain, head, afh_chain);

return (0);
}

Expand Down Expand Up @@ -132,7 +132,7 @@ afm_top(ifp)
break;
if (head == NULL)
return NULL;

return (head->afh_head.lh_first);
}

Expand Down Expand Up @@ -176,7 +176,7 @@ int afm_add(ifp, flowmap)
return 0;
}

int
int
afm_remove(afm)
struct afm *afm;
{
Expand All @@ -185,7 +185,7 @@ afm_remove(afm)
return (0);
}

int
int
afm_removeall(ifp)
struct ifnet *ifp;
{
Expand Down Expand Up @@ -397,7 +397,7 @@ afmioctl(dev, cmd, addr, flag, p)

/* lookup interface */
flowmap = (struct atm_flowmap *)addr;
flowmap->af_ifname[IFNAMSIZ-1] = '\0';
flowmap->af_ifname[IFNAMSIZ-1] = '\0';
ifp = ifunit(flowmap->af_ifname);
if (ifp == NULL || ifp->if_ioctl == NULL ||
(ifp->if_flags & IFF_RUNNING) == 0)
Expand Down
24 changes: 12 additions & 12 deletions kame/sys/altq/altq_blue.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: altq_blue.c,v 1.10 2002/11/05 03:48:30 itojun Exp $ */
/* $KAME: altq_blue.c,v 1.11 2002/11/29 04:36:22 kjc Exp $ */

/*
* Copyright (C) 1997-2002
Expand Down Expand Up @@ -177,7 +177,7 @@ blueioctl(dev, cmd, addr, flag, p)
#endif
break;
}

switch (cmd) {

case BLUE_ENABLE:
Expand Down Expand Up @@ -213,7 +213,7 @@ blueioctl(dev, cmd, addr, flag, p)
M_DEVBUF, M_WAITOK);
bzero(rqp->rq_q, sizeof(class_queue_t));

MALLOC(rqp->rq_blue, blue_t *, sizeof(blue_t), M_DEVBUF, M_WAITOK);
MALLOC(rqp->rq_blue, blue_t *, sizeof(blue_t), M_DEVBUF, M_WAITOK);
bzero(rqp->rq_blue, sizeof(blue_t));

rqp->rq_ifq = &ifp->if_snd;
Expand Down Expand Up @@ -300,7 +300,7 @@ blueioctl(dev, cmd, addr, flag, p)
if (fc->blue_hold_time > 0)
rqp->rq_blue->blue_hold_time = fc->blue_hold_time;
rqp->rq_blue->blue_flags = fc->blue_flags;

blue_init(rqp->rq_blue, rqp->rq_blue->blue_flags,
rqp->rq_blue->blue_pkttime,
rqp->rq_blue->blue_max_pmark,
Expand Down Expand Up @@ -349,7 +349,7 @@ static int blue_detach(rqp)
* blue support routines
*/

int
int
blue_init(rp, flags, pkttime, blue_max_pmark, blue_hold_time)
blue_t *rp;
int flags;
Expand All @@ -358,7 +358,7 @@ blue_init(rp, flags, pkttime, blue_max_pmark, blue_hold_time)
int blue_hold_time;
{
int npkts_per_sec;

rp->blue_idle = 1;
rp->blue_flags = flags;
rp->blue_pkttime = pkttime;
Expand Down Expand Up @@ -412,11 +412,11 @@ blue_addq(rp, q, m, pktattr)
struct altq_pktattr *pktattr;
{
int droptype;

/*
* if we were idle, this is an enqueue onto an empty queue
* and we should decrement marking probability
*
*
*/
if (rp->blue_idle) {
struct timeval now;
Expand Down Expand Up @@ -447,7 +447,7 @@ blue_addq(rp, q, m, pktattr)
#ifdef BLUE_STATS
rp->blue_stats.marked_packets++;
#endif
} else {
} else {
/* unforced drop by blue */
droptype = DTYPE_EARLY;
}
Expand Down Expand Up @@ -547,7 +547,7 @@ mark_ecn(m, pktattr, flags)
struct ip *ip = (struct ip *)pktattr->pattr_hdr;
u_int8_t otos;
int sum;

if (ip->ip_v != 4)
return (0); /* version mismatch! */
if ((ip->ip_tos & IPTOS_ECN_MASK) == IPTOS_ECN_NOTECT)
Expand Down Expand Up @@ -621,7 +621,7 @@ blue_dequeue(ifq, op)

if (op == ALTDQ_POLL)
return (qhead(rqp->rq_q));

m = blue_getq(rqp->rq_blue, rqp->rq_q);
if (m != NULL)
ifq->ifq_len--;
Expand All @@ -633,7 +633,7 @@ struct mbuf *blue_getq(rp, q)
class_queue_t *q;
{
struct mbuf *m;

if ((m = _getq(q)) == NULL) {
if (rp->blue_idle == 0) {
rp->blue_idle = 1;
Expand Down
4 changes: 2 additions & 2 deletions kame/sys/altq/altq_blue.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: altq_blue.h,v 1.6 2002/04/03 05:38:50 kjc Exp $ */
/* $KAME: altq_blue.h,v 1.7 2002/11/29 04:36:22 kjc Exp $ */

/*
* Copyright (C) 1997-2002
Expand Down Expand Up @@ -63,7 +63,7 @@ struct blue_conf {
#define BLUEF_ECN6 0x02 /* use packet marking for IPv6 packets */
#define BLUEF_ECN (BLUEF_ECN4 | BLUEF_ECN6)

/*
/*
* IOCTLs for BLUE
*/
#define BLUE_IF_ATTACH _IOW('Q', 1, struct blue_interface)
Expand Down
12 changes: 6 additions & 6 deletions kame/sys/altq/altq_cbq.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: altq_cbq.c,v 1.11 2002/10/04 14:24:09 kjc Exp $ */
/* $KAME: altq_cbq.c,v 1.12 2002/11/29 04:36:23 kjc Exp $ */

/*
* Copyright (c) Sun Microsystems, Inc. 1993-1998 All rights reserved.
Expand Down Expand Up @@ -26,7 +26,7 @@
* SUN MICROSYSTEMS DOES NOT CLAIM MERCHANTABILITY OF THIS SOFTWARE OR THE
* SUITABILITY OF THIS SOFTWARE FOR ANY PARTICULAR PURPOSE. The software is
* provided "as is" without express or implied warranty of any kind.
*
*
* These notices must be retained in any copies of any part of this software.
*/

Expand Down Expand Up @@ -374,11 +374,11 @@ cbq_delete_filter(dfp)
{
char *ifacename;
cbq_state_t *cbqp;

ifacename = dfp->cbq_iface.cbq_ifacename;
if ((cbqp = altq_lookup(ifacename, ALTQT_CBQ)) == NULL)
return (EBADF);

return acc_delete_filter(&cbqp->cbq_classifier,
dfp->cbq_filter_handle);
}
Expand Down Expand Up @@ -627,7 +627,7 @@ cbq_ifattach(ifacep)
bzero(new_cbqp->cbq_class_tbl, sizeof(struct rm_class *) * CBQ_MAX_CLASSES);
new_cbqp->cbq_qlen = 0;
new_cbqp->ifnp.ifq_ = &ifp->if_snd; /* keep the ifq */

/*
* set CBQ to this ifnet structure.
*/
Expand Down Expand Up @@ -934,7 +934,7 @@ static void cbq_class_dump(i)
return;
}
cl = cbq_list->cbq_class_tbl[i];

printf("class %d cl=%p\n", i, cl);
if (cl != NULL) {
s = &cl->stats_;
Expand Down
16 changes: 8 additions & 8 deletions kame/sys/altq/altq_cbq.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $KAME: altq_cbq.h,v 1.7 2002/07/18 12:22:29 itojun Exp $ */
/* $KAME: altq_cbq.h,v 1.8 2002/11/29 04:36:23 kjc Exp $ */

/*
* Copyright (c) Sun Microsystems, Inc. 1993-1998 All rights reserved.
Expand Down Expand Up @@ -26,7 +26,7 @@
* SUN MICROSYSTEMS DOES NOT CLAIM MERCHANTABILITY OF THIS SOFTWARE OR THE
* SUITABILITY OF THIS SOFTWARE FOR ANY PARTICULAR PURPOSE. The software is
* provided "as is" without express or implied warranty of any kind.
*
*
* These notices must be retained in any copies of any part of this software.
*/

Expand All @@ -43,7 +43,7 @@

#ifdef __cplusplus
extern "C" {
#endif
#endif

/*
* Define a well known class handles
Expand Down Expand Up @@ -71,7 +71,7 @@ typedef struct cbq_class_spec {
u_int nano_sec_per_byte;
u_int maxq;
u_int maxidle;
int minidle;
int minidle;
u_int offtime;
u_long parent_class_handle;
u_long borrow_class_handle;
Expand Down Expand Up @@ -102,7 +102,7 @@ typedef struct cbq_class_spec {
struct cbq_add_class {
struct cbq_interface cbq_iface;

cbq_class_spec_t cbq_class;
cbq_class_spec_t cbq_class;
u_long cbq_class_handle;
};

Expand All @@ -114,7 +114,7 @@ struct cbq_delete_class {
struct cbq_modify_class {
struct cbq_interface cbq_iface;

cbq_class_spec_t cbq_class;
cbq_class_spec_t cbq_class;
u_long cbq_class_handle;
};

Expand Down Expand Up @@ -166,7 +166,7 @@ struct cbq_getstats {
class_stats_t *stats;
};

/*
/*
* Define IOCTLs for CBQ.
*/
#define CBQ_IF_ATTACH _IOW('Q', 1, struct cbq_interface)
Expand Down Expand Up @@ -214,6 +214,6 @@ typedef struct cbqstate {

#ifdef __cplusplus
}
#endif
#endif

#endif /* !_ALTQ_ALTQ_CBQ_H_ */
Loading

0 comments on commit 47d5cec

Please sign in to comment.