Bug 13144 - samba-4.7.2/source4/heimdal/lib/hcrypto/libtommath/bn_mp_div.c:45: strange expression ?
Summary: samba-4.7.2/source4/heimdal/lib/hcrypto/libtommath/bn_mp_div.c:45: strange ex...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.7.2
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
Depends on:
Reported: 2017-11-15 14:24 UTC by David Binderman
Modified: 2017-11-15 14:24 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2017-11-15 14:24:57 UTC
samba-4.7.2/source4/heimdal/lib/hcrypto/libtommath/bn_mp_div.c:45]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

  if ((res = mp_init_multi(&ta, &tb, &tq, &q, NULL) != MP_OKAY)) {

Maybe better code:

  if ((res = mp_init_multi(&ta, &tb, &tq, &q, NULL)) != MP_OKAY) {