From 1101e8febdbde1511cbe273ac1a05d987e45af25 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 1 Apr 2024 20:30:03 +0200 Subject: Reformatted set_inc() --- FICS/variable.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'FICS') 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 -- cgit v1.2.3