Commit 15a702a8 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fix typo when reallocating old_if.

This was introduced when the old_if table was made dynamic.
parent 39c5f0a9
...@@ -651,7 +651,7 @@ get_old_if(const char *ifname) ...@@ -651,7 +651,7 @@ get_old_if(const char *ifname)
if(num_old_if >= MAX_INTERFACES) if(num_old_if >= MAX_INTERFACES)
return -1; return -1;
if(num_old_if >= max_old_if) { if(num_old_if >= max_old_if) {
int n = max_old_if = 0 ? 4 : 2 * max_old_if; int n = max_old_if == 0 ? 4 : 2 * max_old_if;
struct old_if *new = struct old_if *new =
realloc(old_if, max_old_if * sizeof(struct old_if)); realloc(old_if, max_old_if * sizeof(struct old_if));
if(new != NULL) { if(new != NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment