Skip to content

Commit

Permalink
sr_module: avoid c99 declarations for older compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Sep 9, 2024
1 parent d725cd4 commit 1ea63fc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sr_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,16 @@ int load_module(char* name)

module_warnings_len = sizeof(module_warnings) / sizeof(module_warnings[0]);

for (int i = 0; i < module_warnings_len; i++) {
if (strncmp(base_name, module_warnings[i].module, len) == 0) {
switch (module_warnings[i].flags)
for (i_tmp = 0; i_tmp < module_warnings_len; i_tmp++) {
if (strncmp(base_name, module_warnings[i_tmp].module, len) == 0) {
switch (module_warnings[i_tmp].flags)
{
case MOD_WARN_EXIT:
LM_ERR("%s\n", module_warnings[i].name);
LM_ERR("%s\n", module_warnings[i_tmp].name);
return -1;

case MOD_WARN_SKIP:
LM_WARN("%s\n", module_warnings[i].name);
LM_WARN("%s\n", module_warnings[i_tmp].name);
return 0;

default:
Expand Down

0 comments on commit 1ea63fc

Please sign in to comment.