rdma: initialize the rd struct

Initialize the rd struct so port_idx is 0 unless set otherwise.
Otherwise, strict_port queries end up passing an uninitialized PORT
nlattr.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
Steve Wise 2018-03-29 09:10:35 -07:00 committed by David Ahern
parent 8d61311611
commit 80c0478fdf
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ int main(int argc, char **argv)
bool json_output = false;
bool force = false;
char *filename;
struct rd rd;
struct rd rd = {};
int opt;
int err;