summaryrefslogtreecommitdiffstats
path: root/utils/nfnl_osf.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-09-19 15:17:04 +0200
committerFlorian Westphal <fw@strlen.de>2018-09-24 11:49:57 +0200
commit7e50ebabbf9c3a5eeb9511d9f32c6104b56da5cd (patch)
tree8096c2c282213fa2bdb6c9da6df58f4fa0e72608 /utils/nfnl_osf.c
parentf40ce2d853591220f16c0851bf8665e6967af1f1 (diff)
Fix a few cases of pointless assignments
This gets rid of a number of assignments which are either redundant or not used afterwards. Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'utils/nfnl_osf.c')
-rw-r--r--utils/nfnl_osf.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/utils/nfnl_osf.c b/utils/nfnl_osf.c
index fad7f700..0ea33fce 100644
--- a/utils/nfnl_osf.c
+++ b/utils/nfnl_osf.c
@@ -157,7 +157,6 @@ static void xt_osf_parse_opt(struct xt_osf_opt *opt, __u16 *optnum, char *obuf,
i = 0;
while (ptr != NULL && i < olen && *ptr != 0) {
val = 0;
- op = 0;
wc = OSF_WSS_PLAIN;
switch (obuf[i]) {
case 'N':
@@ -344,7 +343,7 @@ static int osf_load_line(char *buffer, int len, int del)
pend = xt_osf_strchr(pbeg, OSFPDEL);
if (pend) {
*pend = '\0';
- cnt = snprintf(obuf, sizeof(obuf), "%s,", pbeg);
+ snprintf(obuf, sizeof(obuf), "%s,", pbeg);
pbeg = pend + 1;
}
@@ -352,25 +351,23 @@ static int osf_load_line(char *buffer, int len, int del)
if (pend) {
*pend = '\0';
if (pbeg[0] == '@' || pbeg[0] == '*')
- cnt = snprintf(f.genre, sizeof(f.genre), "%s", pbeg + 1);
+ snprintf(f.genre, sizeof(f.genre), "%s", pbeg + 1);
else
- cnt = snprintf(f.genre, sizeof(f.genre), "%s", pbeg);
+ snprintf(f.genre, sizeof(f.genre), "%s", pbeg);
pbeg = pend + 1;
}
pend = xt_osf_strchr(pbeg, OSFPDEL);
if (pend) {
*pend = '\0';
- cnt = snprintf(f.version, sizeof(f.version), "%s", pbeg);
+ snprintf(f.version, sizeof(f.version), "%s", pbeg);
pbeg = pend + 1;
}
pend = xt_osf_strchr(pbeg, OSFPDEL);
if (pend) {
*pend = '\0';
- cnt =
- snprintf(f.subtype, sizeof(f.subtype), "%s", pbeg);
- pbeg = pend + 1;
+ snprintf(f.subtype, sizeof(f.subtype), "%s", pbeg);
}
xt_osf_parse_opt(f.opt, &f.opt_num, obuf, sizeof(obuf));