[Chilli] [Patch] Fix auth state in redir_main()
David Bird
david at coova.com
Sat May 22 17:11:20 UTC 2010
Indeed, I see your point; that we wanted the first value later.
committed in rev 332.
On Sat, 2010-05-22 at 18:58 +0200, IT-Systemmanagement Pieter Hollants
wrote:
> Am 22.05.2010 07:12, schrieb David Bird:
> > Thanks, though, there isn't really any harm in reusing the variable
> > since it's never part of any conditional. It amounts to:
> >
> > int state = 0; /* initialization not really needed */
> >
> > state = func();
> > if (state) /* something */
> >
> > state = func();
> > switch(state) /* something */
> >
> > Thanks,
> > David
>
> Uhm, yes it is, because the switch depends on the outcome of the first
> function call, redir->cb_getstate(), which returns 0 for unauth'ed, 1
> for auth'ed, not the second function call, redir_getreq.
>
More information about the Chilli
mailing list