aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-04-01 20:30:03 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-04-01 20:30:03 +0200
commit1101e8febdbde1511cbe273ac1a05d987e45af25 (patch)
tree4a6f2b036e2153157d67c4eeab7cb5d77d807721
parent4ddc25b1867cc76a98dedf18f235dfb2d8b13c51 (diff)
Reformatted set_inc()
-rw-r--r--FICS/variable.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/FICS/variable.c b/FICS/variable.c
index 7fa058b..71a2c77 100644
--- a/FICS/variable.c
+++ b/FICS/variable.c
@@ -367,19 +367,21 @@ PRIVATE int set_time(int p, char *var, char *val)
return VAR_OK;
}
-PRIVATE int set_inc(int p, char *var, char *val)
+PRIVATE int
+set_inc(int p, char *var, char *val)
{
- int v = -1;
+ int v = -1;
- if (!val)
- return VAR_BADVAL;
- if (sscanf(val, "%d", &v) != 1)
- return VAR_BADVAL;
- if ((v < 0) || (v > 300))
- return VAR_BADVAL;
- parray[p].d_inc = v;
- pprintf(p, "Default increment set to %d.\n", v);
- return VAR_OK;
+ if (!val)
+ return VAR_BADVAL;
+ if (sscanf(val, "%d", &v) != 1)
+ return VAR_BADVAL;
+ if (v < 0 || v > 300)
+ return VAR_BADVAL;
+
+ parray[p].d_inc = v;
+ pprintf(p, "Default increment set to %d.\n", v);
+ return VAR_OK;
}
PRIVATE int