summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authormongo <mongo@iomega>2017-02-08 10:28:57 -0300
committermongo <mongo@iomega>2017-02-08 10:28:57 -0300
commitc656c18bbaccb5d32acf6ac16b7b0e4e7c3130b9 (patch)
treee9e6fcf6d7321bdea2f374b56fa5abc9333ed616 /src/main.c
parent205a134c92736e2b2c780f7f952f3c411d0399e2 (diff)
Avoid variable declaration in for statement
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 206cf4d..70846db 100644
--- a/src/main.c
+++ b/src/main.c
@@ -328,7 +328,8 @@ int exit_app(int status) {
// we read parameters passed to SC-IM executable
// and store them in user_conf dictionary
void read_argv(int argc, char ** argv) {
- for (int i = 1; i < argc; i++) {
+ int i;
+ for (i = 1; i < argc; i++) {
if ( ! strncmp(argv[i], "--", 2) ) { // it was passed a parameter
char *dup = strdup(argv[i]);
char *rest = dup;