From: Ben Pfaff Date: Tue, 19 Jan 2010 18:10:52 +0000 (-0800) Subject: dpif-linux: Always set *fnp in make_openvswitch_device(). X-Git-Tag: v0.99.1~1^2~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8334b477a4b0973390b6d59f4cb5aa403511e077;hp=295ba862fc72dbb597a21064af99fc63a1936282;p=sliver-openvswitch.git dpif-linux: Always set *fnp in make_openvswitch_device(). Some versions of GCC warn about this. Always initializing it seems like the right thing to do, since we "almost always" initialized it before. Reported-by: Neil McKee --- diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index b7ba3062e..e7d43811d 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -571,13 +571,14 @@ make_openvswitch_device(int minor, char **fnp) struct stat s; char fn[128]; + *fnp = NULL; + major = get_openvswitch_major(); if (major < 0) { return -major; } dev = makedev(major, minor); - *fnp = NULL; sprintf(fn, "%s/dp%d", dirname, minor); if (!stat(fn, &s)) { if (!S_ISCHR(s.st_mode)) {