Module: kamailio
Branch: master
Commit: 92a6788ab30f07e1a7213b54aae8ac38323655e9
URL: 
https://github.com/kamailio/kamailio/commit/92a6788ab30f07e1a7213b54aae8ac38323655e9

Author: Henning Westerholt <h...@gilawa.com>
Committer: Henning Westerholt <h...@gilawa.com>
Date: 2025-08-04T19:44:02Z

file_out: fix another error, for loop initial declarations are only allowed in 
C99 mode

---

Modified: src/modules/file_out/file_out.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/92a6788ab30f07e1a7213b54aae8ac38323655e9.diff
Patch: 
https://github.com/kamailio/kamailio/commit/92a6788ab30f07e1a7213b54aae8ac38323655e9.patch

---

diff --git a/src/modules/file_out/file_out.c b/src/modules/file_out/file_out.c
index 0303e1c956f..4a7a88d5e40 100644
--- a/src/modules/file_out/file_out.c
+++ b/src/modules/file_out/file_out.c
@@ -380,6 +380,7 @@ static int fo_fixup_free_int_pvar(void **param, int 
param_no)
 
 static int fo_add_filename(modparam_t type, void *val)
 {
+       int i = 0;
        if(val == NULL) {
                LM_ERR("modparam value is null\n");
                return -1;
@@ -406,7 +407,7 @@ static int fo_add_filename(modparam_t type, void *val)
                        SHM_MEM_ERROR;
                        return -1;
                }
-               for(int i = 0; i < FO_MAX_FILES; i++) {
+               for(i = 0; i < FO_MAX_FILES; i++) {
                        fo_file_properties_init(&fo_files[i]);
                }
        }

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to