aboutsummaryrefslogtreecommitdiffstats
path: root/src/diag_dpl.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-01-24 17:36:39 +0100
committerHarald Welte <laforge@gnumonks.org>2017-01-24 17:36:39 +0100
commitcb5d8473d73ae42168f39383acd62c7ca42de04a (patch)
treefd650e71bc7512fb9608c2ac30811e232833df2e /src/diag_dpl.c
parentc17070464fb3ede78de66d03800ca6ab08ede885 (diff)
move variable declarations out of the 'for' loop
this fixes compilation with gcc-4.8
Diffstat (limited to 'src/diag_dpl.c')
-rw-r--r--src/diag_dpl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/diag_dpl.c b/src/diag_dpl.c
index b9fd901..b5a1bb0 100644
--- a/src/diag_dpl.c
+++ b/src/diag_dpl.c
@@ -97,11 +97,12 @@ int diag_dpl_set_if_log(struct diag_instance *di, uint8_t iface_id,
struct msgb *msg = msgb_alloc_diag();
struct dpl_set_if_log_req *silr;
struct msgb *rx;
+ int i;
silr = (struct dpl_set_if_log_req *) msgb_put(msg, sizeof(*silr));
silr->iface_id = iface_id;
silr->num_log_flags = 0;
- for (int i = 0; i < 1; i++) {
+ for (i = 0; i < 1; i++) {
msgb_put(msg, sizeof(silr->log_flags[0]));
silr->num_log_flags++;
iid.link_instance = i;