Skip to content
Snippets Groups Projects
Commit aab1aada authored by Jakob Olsson's avatar Jakob Olsson
Browse files

host: return 0 network stats if invalid input

parent facea752
Branches
No related tags found
1 merge request!24host: Adding NULL pointer checks
Pipeline #16704 passed with warnings
......@@ -818,7 +818,7 @@ static unsigned long long get_netdev_stats(char *device, char *stat)
unsigned long long val = 0;
if (!device || !stat)
return 1;
return 0;
snprintf(sysnet, 128, "/sys/class/net/%s/statistics/%s", device, stat);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment