vmware / likewise-open

Likewise OSS project
Other
38 stars 32 forks source link

Update security.c #11

Closed ppadmavilasom closed 4 years ago

ppadmavilasom commented 7 years ago

Noticed when this issue was triggered in gcc-6.3 ../lwmsg/src/security.c:108:28: error: self-comparison always evaluates to false [-Werror=tautological-compare]
else if (token->tclass != token->tclass)

numberer6 commented 7 years ago

From the comment, I'm guessing the line 108 in security.c should read as: else if (token->tclass != other->tclass)

This is probably a copy/paste error which has been in likewise forever.

Update: Actually, isn't line 114 the same test as line 108? return token->tclass->equal(token, other);

ppadmavilasom commented 7 years ago

I have the PR attached. I think line 108 is meant to compare pointers and take an early exit line 114 is calling a method which compares contents - yes the end result should be same