Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovn-nbctl: Initialize arguments to avoid compilation warnings.
Output arguments for parse_priority() and dhcp_options_get() may not be initialized when either function returns an error. This causes compilation warnings for GCC 6.3.x regarding use of uninitialized variable use and null-pointer-arithmetic. Fix this by initializing priority_p* value to 0 for priority_parse() when an error occurs during parsing. For dhcp_options_get() set *dhcp_opts_p = dhcp_opts regardless as dhcp_opts will be equal to NULL when an error occurs within the function anyhow. Cc: Jakub Sitnicki <[email protected]> Fixes: 3844c85 ("ovn-nbctl: Don't die in dhcp_options_get()." Fixes: bc8223d ("ovn-nbctl: Don't die in parse_priority().") Signed-off-by: Ian Stokes <[email protected]> Signed-off-by: Ben Pfaff <[email protected]> Acked-by: Jakub Sitnicki <[email protected]>
- Loading branch information