diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-08-05 09:23:33 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-22 02:26:05 +0100 |
commit | a878ba45729e28709f5916b0ff04bd1620751d60 (patch) | |
tree | 9727a4d198b010b9b336d2f305ff0abc11d259b8 /pimd/pim_sock.c | |
parent | pimd: Send hello immediately with receive of new genid (diff) | |
download | frr-a878ba45729e28709f5916b0ff04bd1620751d60.tar.xz frr-a878ba45729e28709f5916b0ff04bd1620751d60.zip |
pimd: Some SA analysis fixes.
This commit addresses some SA issues found:
1) double set variables
2) value set but never used.
3) wrong return path used.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_sock.c')
-rw-r--r-- | pimd/pim_sock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index a4155549c..8f8f4f191 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -334,7 +334,7 @@ int pim_socket_recvfromto(int fd, uint8_t *buf, size_t len, ((struct sockaddr_in *) to)->sin_family = AF_INET; - if (pim_socket_getsockname(fd, (struct sockaddr *) &si, &si_len)) { + if (pim_socket_getsockname(fd, (struct sockaddr *) &si, &si_len) != PIM_SOCK_ERR_NONE) { ((struct sockaddr_in *) to)->sin_port = ntohs(0); ((struct sockaddr_in *) to)->sin_addr.s_addr = ntohl(0); } |