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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-15 14:24 UTC by David Binderman
Modified: 2017-11-15 14:24 UTC (History)
0 users

See Also:


Attachments

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) {