#1856 ding-libs.collection: comparision has no effect
Closed: Fixed None Opened 11 years ago by okos.

comparision between the same variables

collection/collection_cmp.c:int col_compare_items

 83        switch(mode) {
 84
 85        case COL_CMPIN_PROP_EQU: /* looking for exact match */
 86
 87            /* Compare hashes and lengths first */

CID 10041 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)same_on_both_sides: "first->phash == first->phash" is always true regardless of the values of its operands because those operands are identical. This occurs as the logical first operand of '&&'.
 88            if ((first->phash == first->phash) &&
 89                (first->property_len == second->property_len)) {
 90                /* Collections are case insensitive, sorry... */
 91                cmpres = strncasecmp(first->property,
 92                                     second->property,
 93                                     second->property_len);

Fields changed

description: comparision between the same variables

{{{
83 switch(mode) {
84
85 case COL_CMPIN_PROP_EQU: / looking for exact match /
86
87 / Compare hashes and lengths first /

CID 10041 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)same_on_both_sides: "first->phash == first->phash" is always true regardless of the values of its operands because those operands are identical. This occurs as the logical first operand of '&&'.
88 if ((first->phash == first->phash) &&
89 (first->property_len == second->property_len)) {
90 / Collections are case insensitive, sorry... /
91 cmpres = strncasecmp(first->property,
92 second->property,
93 second->property_len);
}}}
=> comparision between the same variables

collection/collection_cmp.c:int col_compare_items
{{{
83 switch(mode) {
84
85 case COL_CMPIN_PROP_EQU: / looking for exact match /
86
87 / Compare hashes and lengths first /

CID 10041 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)same_on_both_sides: "first->phash == first->phash" is always true regardless of the values of its operands because those operands are identical. This occurs as the logical first operand of '&&'.
88 if ((first->phash == first->phash) &&
89 (first->property_len == second->property_len)) {
90 / Collections are case insensitive, sorry... /
91 cmpres = strncasecmp(first->property,
92 second->property,
93 second->property_len);
}}}

summary: comparision has no effect => ding-libs.collection: comparision has no effect

Fields changed

description: comparision between the same variables

{{{
83 switch(mode) {
84
85 case COL_CMPIN_PROP_EQU: / looking for exact match /
86
87 / Compare hashes and lengths first /

CID 10041 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)same_on_both_sides: "first->phash == first->phash" is always true regardless of the values of its operands because those operands are identical. This occurs as the logical first operand of '&&'.
88 if ((first->phash == first->phash) &&
89 (first->property_len == second->property_len)) {
90 / Collections are case insensitive, sorry... /
91 cmpres = strncasecmp(first->property,
92 second->property,
93 second->property_len);
}}}
=> comparision between the same variables

collection/collection_cmp.c:int col_compare_items
{{{
83 switch(mode) {
84
85 case COL_CMPIN_PROP_EQU: / looking for exact match /
86
87 / Compare hashes and lengths first /

CID 10041 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)same_on_both_sides: "first->phash == first->phash" is always true regardless of the values of its operands because those operands are identical. This occurs as the logical first operand of '&&'.
88 if ((first->phash == first->phash) &&
89 (first->property_len == second->property_len)) {
90 / Collections are case insensitive, sorry... /
91 cmpres = strncasecmp(first->property,
92 second->property,
93 second->property_len);
}}}

summary: comparision has no effect => ding-libs.collection: comparision has no effect

Fields changed

description: comparision between the same variables

{{{
83 switch(mode) {
84
85 case COL_CMPIN_PROP_EQU: / looking for exact match /
86
87 / Compare hashes and lengths first /

CID 10041 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)same_on_both_sides: "first->phash == first->phash" is always true regardless of the values of its operands because those operands are identical. This occurs as the logical first operand of '&&'.
88 if ((first->phash == first->phash) &&
89 (first->property_len == second->property_len)) {
90 / Collections are case insensitive, sorry... /
91 cmpres = strncasecmp(first->property,
92 second->property,
93 second->property_len);
}}}
=> comparision between the same variables

collection/collection_cmp.c:int col_compare_items
{{{
83 switch(mode) {
84
85 case COL_CMPIN_PROP_EQU: / looking for exact match /
86
87 / Compare hashes and lengths first /

CID 10041 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)same_on_both_sides: "first->phash == first->phash" is always true regardless of the values of its operands because those operands are identical. This occurs as the logical first operand of '&&'.
88 if ((first->phash == first->phash) &&
89 (first->property_len == second->property_len)) {
90 / Collections are case insensitive, sorry... /
91 cmpres = strncasecmp(first->property,
92 second->property,
93 second->property_len);
}}}

summary: comparision has no effect => ding-libs.collection: comparision has no effect

Fields changed

patch: 0 => 1

Fields changed

patch: 0 => 1

Fields changed

patch: 0 => 1

Fields changed

milestone: NEEDS_TRIAGE => Tools 1.0.1

Fields changed

milestone: NEEDS_TRIAGE => Tools 1.0.1

Fields changed

milestone: NEEDS_TRIAGE => Tools 1.0.1

Fields changed

rhbz: => 0

Fields changed

rhbz: => 0

Fields changed

rhbz: => 0

Fields changed

owner: somebody => okos

Fields changed

owner: somebody => okos

Fields changed

owner: somebody => okos

resolution: => fixed
status: new => closed
_comment0: * master: bba9bb80671636886206f74549705329c42e4bcc => 1365609469798082

resolution: => fixed
status: new => closed
_comment0: * master: bba9bb80671636886206f74549705329c42e4bcc => 1365609469798082

resolution: => fixed
status: new => closed
_comment0: * master: bba9bb80671636886206f74549705329c42e4bcc => 1365609469798082

Metadata Update from @okos:
- Issue assigned to okos
- Issue set to the milestone: Tools 1.0.1

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/2898

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Log in to comment on this ticket.

Metadata