Deleted Added
full compact
29c29
< __FBSDID("$FreeBSD: head/sys/netgraph/ng_patch.c 208946 2010-06-09 12:25:57Z ae $");
---
> __FBSDID("$FreeBSD: head/sys/netgraph/ng_patch.c 208989 2010-06-10 16:45:30Z ae $");
33,34d32
< #include <sys/mbuf.h>
< #include <sys/malloc.h>
36d33
< #include <sys/errno.h>
37a35,37
> #include <sys/errno.h>
> #include <sys/malloc.h>
> #include <sys/mbuf.h>
50c50
< #define OFFSETOF(s, e) ((char *)&((s *)0)->e - (char *)((s *)0))
---
> #define OFFSETOF(s, e) ((char *)&((s *)0)->e - (char *)((s *)0))
53,54c53,54
< ng_patch_config_getlen(const struct ng_parse_type *type, const u_char *start,
< const u_char *buf)
---
> ng_patch_config_getlen(const struct ng_parse_type *type,
> const u_char *start, const u_char *buf)
161c161
< #define NG_PATCH_CONF_SIZE(count) (sizeof(struct ng_patch_config) + \
---
> #define NG_PATCH_CONF_SIZE(count) (sizeof(struct ng_patch_config) + \
198c198,199
< struct ng_patch_config *conf;
---
> struct ng_patch_config *conf, *newconf;
> union patch_val *newval;
200,202c201,202
< struct ng_mesg *resp = NULL;
< int i, clear = 0;
< int error = 0;
---
> struct ng_mesg *resp;
> int i, clear, error;
203a204,205
> clear = error = 0;
> resp = NULL;
218,221c220,221
< struct ng_patch_config *newconf;
< union patch_val *newval;
<
< if (msg->header.arglen < sizeof(struct ng_patch_config)) {
---
> if (msg->header.arglen <
> sizeof(struct ng_patch_config)) {
227c227,228
< if (msg->header.arglen < NG_PATCH_CONF_SIZE(conf->count)) {
---
> if (msg->header.arglen <
> NG_PATCH_CONF_SIZE(conf->count)) {
251c252,253
< newconf = malloc(NG_PATCH_CONF_SIZE(conf->count),
---
> newconf = malloc(
> NG_PATCH_CONF_SIZE(conf->count),
253,254c255,257
< newval = malloc(conf->count * sizeof(union patch_val),
< M_NETGRAPH, M_WAIT);
---
> newval = malloc(conf->count *
> sizeof(union patch_val), M_NETGRAPH,
> M_WAIT);
258c261,262
< newval[i].v1 = conf->ops[i].value;
---
> newval[i].v1 =
> conf->ops[i].value;
261c265,266
< newval[i].v2 = conf->ops[i].value;
---
> newval[i].v2 =
> conf->ops[i].value;
264c269,270
< newval[i].v4 = conf->ops[i].value;
---
> newval[i].v4 =
> conf->ops[i].value;
267c273,274
< newval[i].v8 = conf->ops[i].value;
---
> newval[i].v8 =
> conf->ops[i].value;
271c278,279
< bcopy(conf, newconf, NG_PATCH_CONF_SIZE(conf->count));
---
> bcopy(conf, newconf,
> NG_PATCH_CONF_SIZE(conf->count));
313c321
< struct ng_patch_config *conf = privp->config;
---
> struct ng_patch_config *conf;
315c323
< int i, patched = 0;
---
> int i, patched;
316a325,326
> conf = privp->config;
> patched = 0;
318c328,329
< if (conf->ops[i].offset + conf->ops[i].length > m->m_pkthdr.len)
---
> if (conf->ops[i].offset + conf->ops[i].length >
> m->m_pkthdr.len)
326c337
<
---
>
553c564
< priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
---
> priv_p priv;
554a566
> priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
561,562c573,574
< if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
< && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) /* already shutting down? */
---
> if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0 &&
> NG_NODE_IS_VALID(NG_HOOK_NODE(hook))) /* already shutting down? */