diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-05-31 19:38:00 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-05-31 19:38:00 +0200 |
commit | 3f83fda46c14e47392ce3bb4d7aef5780a80ac78 (patch) | |
tree | 27283f40fe6410a06649095b24fd35039f44929b /lib/data.c | |
parent | 418a3a4f4d4e38abd1d691f81f2445590f02ecaf (diff) |
Whitespace and coding fixes detected by checkpatch.pl
Diffstat (limited to 'lib/data.c')
-rw-r--r-- | lib/data.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -1,7 +1,7 @@ /* Copyright 2007-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu) * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <assert.h> /* assert */ @@ -18,7 +18,7 @@ #include <libipset/utils.h> /* inXcpy */ #include <libipset/data.h> /* prototypes */ -/* Internal data structure to hold +/* Internal data structure to hold * a) input data entered by the user or * b) data received from kernel * @@ -174,7 +174,7 @@ ipset_data_ignored(struct ipset_data *data, enum ipset_opt opt) { bool ignored; assert(data); - + ignored = data->ignored & IPSET_FLAG(opt); data->ignored |= IPSET_FLAG(opt); @@ -329,7 +329,7 @@ ipset_data_set(struct ipset_data *data, enum ipset_opt opt, const void *value) default: return -1; }; - + ipset_data_flags_set(data, IPSET_FLAG(opt)); return 0; } @@ -348,7 +348,7 @@ ipset_data_get(const struct ipset_data *data, enum ipset_opt opt) { assert(data); assert(opt != IPSET_OPT_NONE); - + if (!(opt == IPSET_OPT_TYPENAME || ipset_data_test(data, opt))) return NULL; @@ -533,8 +533,8 @@ uint8_t ipset_data_cidr(const struct ipset_data *data) { assert(data); - return ipset_data_test(data, IPSET_OPT_CIDR) ? data->cidr : - data->family == AF_INET ? 32 : + return ipset_data_test(data, IPSET_OPT_CIDR) ? data->cidr : + data->family == AF_INET ? 32 : data->family == AF_INET6 ? 128 : 0; } |