Last Comment Bug 443760 - Extra semicolon in SeqDatabase makes static analysis tool suspicious
: Extra semicolon in SeqDatabase makes static analysis tool suspicious
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: unspecified
: All All
: -- trivial (vote)
: 3.12.1
Assigned To: Jesse Ruderman
: Testing
:
Mentors:
Depends on:
Blocks: InspectTool
  Show dependency treegraph
 
Reported: 2008-07-05 16:22 PDT by Jesse Ruderman
Modified: 2008-07-11 21:08 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (700 bytes, patch)
2008-07-05 16:22 PDT, Jesse Ruderman
wtc: review+
Details | Diff | Splinter Review

Description Jesse Ruderman 2008-07-05 16:22:27 PDT
Created attachment 328234 [details] [diff] [review]
patch

From the reporter of bug 440771:

dbm/tests/lots.c:211

        while(!(status = (database->seq) (database, &key, &data, R_NEXT)));
			; /* null body */

Removing the semicolon from the first line won't change the compiled code, since the body of the while loop is empty anyway.  So I don't think I need code review.

Which repository do mozilla/dbm patches go into?  mozilla-central?
Comment 1 neil@parkwaycc.co.uk 2008-07-06 02:37:20 PDT
(In reply to comment #0)
>         while(!(status = (database->seq) (database, &key, &data, R_NEXT)));
>                         ; /* null body */
This might be more readable as a do loop:
do {
  status = (database->seq) (database, &key, &data, R_NEXT);
} while (!status);
Comment 2 Wan-Teh Chang 2008-07-11 18:16:26 PDT
Comment on attachment 328234 [details] [diff] [review]
patch

r=wtc.  The master source of mozilla/dbm is in the CVS repository.
It is now maintained by the NSS team.
Comment 3 Jesse Ruderman 2008-07-11 20:22:38 PDT
Thanks, wtc.  Can you check it in for me or CC someone who can?
Comment 4 Wan-Teh Chang 2008-07-11 21:08:57 PDT
I checked in your patch on the NSS trunk for NSS 3.12.1.

Checking in lots.c;
/cvsroot/mozilla/dbm/tests/lots.c,v  <--  lots.c
new revision: 3.15; previous revision: 3.14
done

Please don't check in this patch in mozilla-central.  We
want to keep the copy of NSS in mozilla-central identical
to snapshots provided by the NSS team.

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