aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-04-01 18:05:25 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2024-04-01 18:05:25 +0200
commit3aece1aaef59cb9242fce4c9bd1e1776f7328e1b (patch)
treed65181205ab31ad5358e1f7fa638a1333bbe6755 /FICS
parentbc702c644b1b12d4b65c6b722386c629605301e9 (diff)
Reformatted var_set()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/variable.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/FICS/variable.c b/FICS/variable.c
index 6a9ae9e..ecb3dc6 100644
--- a/FICS/variable.c
+++ b/FICS/variable.c
@@ -807,17 +807,20 @@ PRIVATE int set_find(char *var)
return -VAR_NOSUCH;
}
-PUBLIC int var_set(int p, char *var, char *val, int *wh)
+PUBLIC int
+var_set(int p, char *var, char *val, int *wh)
{
- int which;
+ int which;
- if (!var)
- return VAR_NOSUCH;
- if ((which = set_find(var)) < 0) {
- return -which;
- }
- *wh = which;
- return variables[which].var_func(p, (isdigit(*variables[which].name) ? var : variables[which].name), val);
+ if (!var)
+ return VAR_NOSUCH;
+ if ((which = set_find(var)) < 0)
+ return -which;
+
+ *wh = which;
+
+ return variables[which].var_func(p, (isdigit(*variables[which].name) ?
+ var : variables[which].name), val);
}
PUBLIC int