[lkml]   [2017]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectipv4: detection of bootable network devices is broken in IP-Config
The procedure below from ipconfig.c assumes that "?" updates user_dev_name[0].
I think that falls under undefined use of the result as an lvalue.

It works when I explicitly assign the result of the operation back to user_dev_name[0].

static bool __init ic_is_init_dev(struct net_device *dev)
if (dev->flags & IFF_LOOPBACK)
return false;
return user_dev_name[0] ? !strcmp(dev->name, user_dev_name) :
(!(dev->flags & IFF_LOOPBACK) &&
strncmp(dev->name, "dummy", 5));


I guess booting from network is uncommon these days.


 \ /
  Last update: 2017-09-18 16:50    [W:0.022 / U:4.004 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site