Closed Bug 14672 Opened 21 years ago Closed 21 years ago

unreachable code in extensions/wallet/src/wallet.cpp

Categories

(Core Graveyard :: Tracking, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: colin, Assigned: morse)

Details

Not sure which component to assign this extensions/wallet concern to.

Something is amiss with this code fragment from
extensions/wallet/src/wallet.cpp:

    for (;;) {
      nsAutoString * aItem1;
      if (NS_FAILED(wallet_GetLine(strm, aItem1, PR_FALSE))) {
        /* end of file reached */
        break;
        strm.close();
        return;
      }
      .
      .
      .

The strm.close and return statements can never be reached!

Colin.
Assignee: chofmann → morse
Target Milestone: M14
You are absolutely right.  It turns out that either deleting the "break" or
deleting the two lines folling the "break" would have the identical effect on
the program flow so either of those fixes are acceptable.  Trivial and safe fix.
But it's not on the beta list so I can't make that fix until M14.  Marking tfv
as such.
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Checked in the fix to wallet.cpp
Status: RESOLVED → VERIFIED
Marking Verified per morse comments.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.