aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-04-01 19:41:04 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-04-01 19:41:04 +0200
commite55e4faebcf7280330b0c3d4d127ce9b3ba2004c (patch)
tree037a3832f10359c4379778253de8af7af7f5477e
parent8a18b0b4f989e3c6803f206e7f7be42f16a105a5 (diff)
Reformatted set_height()
-rw-r--r--FICS/variable.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/FICS/variable.c b/FICS/variable.c
index d41e17c..b4a3a3c 100644
--- a/FICS/variable.c
+++ b/FICS/variable.c
@@ -382,19 +382,22 @@ PRIVATE int set_inc(int p, char *var, char *val)
return VAR_OK;
}
-PRIVATE int set_height(int p, char *var, char *val)
+PRIVATE int
+set_height(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 < 5) || (v > 240))
- return VAR_BADVAL;
- parray[p].d_height = v;
- pprintf(p, "Height set to %d.\n", v);
- return VAR_OK;
+ if (!val)
+ return VAR_BADVAL;
+ if (sscanf(val, "%d", &v) != 1)
+ return VAR_BADVAL;
+ if (v < 5 || v > 240)
+ return VAR_BADVAL;
+
+ parray[p].d_height = v;
+
+ pprintf(p, "Height set to %d.\n", v);
+ return VAR_OK;
}
PRIVATE int