summaryrefslogtreecommitdiffstats
path: root/src/errcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/errcode.c')
-rw-r--r--src/errcode.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/errcode.c b/src/errcode.c
index 9d5f226..1ce5c00 100644
--- a/src/errcode.c
+++ b/src/errcode.c
@@ -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 */
@@ -70,7 +70,7 @@ static const struct ipset_errcode_table core_errcode_table[] = {
"An IPv4 address is expected, but not received" },
{ IPSET_ERR_IPADDR_IPV6, 0,
"An IPv6 address is expected, but not received" },
-
+
/* ADD specific error codes */
{ IPSET_ERR_EXIST, IPSET_CMD_ADD,
"Element cannot be added to the set: it's already added" },
@@ -157,10 +157,10 @@ ipset_errcode(struct ipset_session *session, enum ipset_cmd cmd, int errcode)
{
const struct ipset_errcode_table *table = core_errcode_table;
int i, generic;
-
+
if (errcode >= IPSET_ERR_TYPE_SPECIFIC) {
const struct ipset_type *type;
-
+
type = ipset_saved_type(session);
if (type) {
if (MATCH_TYPENAME(type->name, "bitmap:"))
@@ -174,11 +174,11 @@ ipset_errcode(struct ipset_session *session, enum ipset_cmd cmd, int errcode)
retry:
for (i = 0, generic = -1; table[i].errcode; i++) {
- if (table[i].errcode == errcode
- && (table[i].cmd == cmd || table[i].cmd == 0)) {
- if (table[i].cmd == 0) {
- generic = i;
- continue;
+ if (table[i].errcode == errcode &&
+ (table[i].cmd == cmd || table[i].cmd == 0)) {
+ if (table[i].cmd == 0) {
+ generic = i;
+ continue;
}
return ipset_err(session, table[i].message);
}