Clang reports "Argument with 'nonnull' attribute passed null" warning.
Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodire...@intel.com> --- lib/dpctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dpctl.c b/lib/dpctl.c index 7f44d02..2ad475b 100644 --- a/lib/dpctl.c +++ b/lib/dpctl.c @@ -555,7 +555,9 @@ show_dpif(struct dpif *dpif, struct dpctl_params *dpctl_p) n_port_nos++; } - qsort(port_nos, n_port_nos, sizeof *port_nos, compare_port_nos); + if (port_nos) { + qsort(port_nos, n_port_nos, sizeof *port_nos, compare_port_nos); + } for (int i = 0; i < n_port_nos; i++) { if (dpif_port_query_by_number(dpif, port_nos[i], &dpif_port)) { -- 2.4.11 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev