[ovs-dev] [PATCH] ovs-appctl: Fix shadow variable that could cause segfault

Ben Pfaff blp at nicira.com
Tue Nov 17 17:17:25 UTC 2009


Justin Pettit <jpettit at nicira.com> writes:

> The variable "socket_name" contains the name of the unix domain socket
> to be used for communicating with the OVS process.  If the target does
> not begin with a "/", the socket name is determined based on a pidfile.
> A shadow copy of "socket_name" was kept in the block that looks at the
> pidfile, which would cause the function-level one to not be set.  This
> removes that shadow copy.

Good catch, thank you.

I wish the GCC option -Wshadow was more useful.




More information about the dev mailing list