Fix logic typo in cmp_secctx
PATCH 1/1 Fix logic typo in cmp_secctx
cppcheck reported:
[src/conntrack/compare.c:364] -> [src/conntrack/compare.c:364]: (style) Same expression on both sides of '||'.
Signed-off-by Thomas Jarosch <[email protected]>
--- src/conntrack/compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/conntrack/compare.c +1 -1
@@ -361,7 +361,7 @@ cmp_secctx(const struct nf_conntrack *ct1, const struct nf_conntrack *ct2, unsigned int flags) { - if (ct1->secctx == NULL || ct1->secctx == NULL) + if (ct1->secctx == NULL || ct2->secctx == NULL) return ct1->secctx == ct2->secctx;return strcmp (ct1->secctx, ct2->secctx) ==0 ; }
Signature · 1 line
1.7.11.7
Quoted 13 lines · Thomas Jarosch
cppcheck reported:
[src/conntrack/compare.c:364] -> [src/conntrack/compare.c:364]: (style) Same expression on both sides of '||'.Signed-off-by Thomas Jarosch <[email protected]>--- src/conntrack/compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/conntrack/compare.c +0
-0
src/conntrack/compare.c cmp_secctx(const struct nf_conntrack *ct1, · line 364
Quoted 5 lines
src/conntrack/compare.c +1
-1@@ -361,7 +361,7 @@ cmp_secctx(const struct nf_conntrack *ct1,const struct nf_conntrack *ct2, unsigned int flags) { - if (ct1->secctx == NULL || ct1->secctx == NULL) + if (ct1->secctx == NULL || ct2->secctx == NULL)
Grrr, my fault.
Applied, thanks for fixing this.