Skip to content

Commit

Permalink
respect ISO C90
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Sep 6, 2024
1 parent 074d8cd commit 2649db6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion os_dep/linux/rtw_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6094,6 +6094,7 @@ static ssize_t proc_set_single_tone(struct file *file, const char __user *buffer

char tmp[32];
u32 en, rf_path;
int num; // Move declaration to the top

if (!padapter)
return -EFAULT;
Expand All @@ -6109,7 +6110,7 @@ static ssize_t proc_set_single_tone(struct file *file, const char __user *buffer
}

if (buffer && !copy_from_user(tmp, buffer, count)) {
int num = sscanf(tmp, "%u %u", &en, &rf_path);
num = sscanf(tmp, "%u %u", &en, &rf_path); // Now, `num` is already declared
if (num < 1)
return count;
}
Expand Down

0 comments on commit 2649db6

Please sign in to comment.