mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
dpctl: Skip invoking qsort on empty list
Clang reports "Argument with 'nonnull' attribute passed null" warning. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
committed by
Ben Pfaff
parent
1cc1b5f6b0
commit
f77ceea3b5
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user