Skip to content

Commit

Permalink
netdev-bsd: Fix netdev_bsd_get_mtu() return value.
Browse files Browse the repository at this point in the history
When netdev_bsd_get_mtu() failed, it didn't report the error to the caller,
so the caller couldn't work around not knowing the MTU, and ended up using
an uninitialized 'mtu' value.

Found by LLVM scan-build.

Reported-by: Kevin Lo <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Jarno Rajahalme <[email protected]>
Acked-by: Kevin Lo <[email protected]>
Acked-by: YAMAMOTO Takashi <[email protected]>
  • Loading branch information
blp committed Apr 17, 2015
1 parent 38221f4 commit e7d6348
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/netdev-bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ netdev_bsd_get_mtu(const struct netdev *netdev_, int *mtup)
}
ovs_mutex_unlock(&netdev->mutex);

return 0;
return error;
}

static int
Expand Down

0 comments on commit e7d6348

Please sign in to comment.