Bug 145766 - dubious code in assert statements
Summary: dubious code in assert statements
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libuser
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-21 11:35 UTC by David Binderman
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-03-04 20:54:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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...


Note You need to log in before you can comment on or make changes to this bug.