Bug 145766

Summary: dubious code in assert statements
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: libuserAssignee: Miloslav Trmač <mitr>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-04 20:54:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Binderman 2005-01-21 11:35:25 UTC
Description of problem:

I just had a look at the source code for package libuser-0.53.2-1
from the Redhat Fedora development tree.

I found this

[root@localhost SPECS]# find ../BUILD/l* -name \*.c -print | xargs
grep "assert.*(.* = "
../BUILD/libuser-0.53.2/modules/krb5.c: g_assert(ent->magic =
LU_ENT_MAGIC);
../BUILD/libuser-0.53.2/modules/krb5.c: g_assert(ent->magic =
LU_ENT_MAGIC);
../BUILD/libuser-0.53.2/modules/krb5.c: g_assert(ent->magic =
LU_ENT_MAGIC);
../BUILD/libuser-0.53.2/modules/krb5.c: g_assert(ent->magic =
LU_ENT_MAGIC);
../BUILD/libuser-0.53.2/modules/krb5.c: g_assert(ent->magic =
LU_ENT_MAGIC);
../BUILD/libuser-0.53.2/modules/krb5.c: g_assert(ent->magic =
LU_ENT_MAGIC);

IMHO, dubious code. Suggest remove nested assignments from the assert
statement.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Miloslav Trmač 2005-03-04 20:54:05 UTC
Thanks, fixed in CVS.
Not that the krb5 module would be possible to compile anyway...