Issue 8824 - openldap-2.4.46/libraries/liblmdb/mdb_dump.c:136]: (style) Suspicious condition
Summary: openldap-2.4.46/libraries/liblmdb/mdb_dump.c:136]: (style) Suspicious condition
Status: UNCONFIRMED
Alias: None
Product: LMDB
Classification: Unclassified
Component: liblmdb (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-26 18:32 UTC by dcb314@hotmail.com
Modified: 2020-03-23 17:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description dcb314@hotmail.com 2018-03-26 18:32:23 UTC
Full_Name: David Binderman
Version: 2.4.46
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (79.65.172.203)


openldap-2.4.46/libraries/liblmdb/mdb_dump.c:136]: (style) Suspicious condition
(assignment + comparison); Clarify expression with parentheses.

Source code is

    while ((rc = mdb_cursor_get(mc, &key, &data, MDB_NEXT) == MDB_SUCCESS)) {

maybe better code

    while ((rc = mdb_cursor_get(mc, &key, &data, MDB_NEXT)) == MDB_SUCCESS) {