URL:
  <http://gna.org/bugs/?17595>

                 Summary: Odd code in
client/gui-gtk-2.0/wldlg.c:refresh_worklist()
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Fri Jan 28 22:17:58 2011
                Category: client-gtk-2.0
                Severity: 2 - Minor
                Priority: 1 - Later
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 

    _______________________________________________________

Details:

Raising a bug for an oddity I don't have time to look at this minute:

At the start of client/gui-gtk-2.0/wldlg.c:refresh_worklist() we have


  if (!ptr->pcity
      && !(pgwl = global_worklist_by_id(ptr->global_worklist_id))) {
  }


Since global_worklist_by_id() doesn't appear to have side effects, I think
this has no effect.

My guess would be it's intended to be an assertion-type pattern. However,
it's not entirely obvious that the rest of the function will fall over if this
condition occurs. For instance, pgwl is checked by assertion later. So I'm not
sure.

I think this came in with r16285
<http://svn.gna.org/viewcvs/freeciv?view=rev&revision=16285>, patch #1291.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?17595>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to