Actions
Bug #3083
closedcrypto/openssh/auth2-pubkey.c:186]: (style) Suspicious condition
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
10/17/2017
Due date:
% Done:
0%
Estimated time:
Description
crypto/openssh/auth2-pubkey.c:186]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.
Source code is
if ((r = sshbuf_put_cstring(b, "publickey")) != 0 ||
(r = sshbuf_put_u8(b, have_sig)) != 0 ||
(r = sshbuf_put_cstring(b, pkalg) != 0))
Maybe better code
if ((r = sshbuf_put_cstring(b, "publickey")) != 0 ||
(r = sshbuf_put_u8(b, have_sig)) != 0 ||
(r = sshbuf_put_cstring(b, pkalg)) != 0)
Actions