[krbdev.mit.edu #3181] init_ctx.c has goto labels crossing outside of switch arms

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[krbdev.mit.edu #3181] init_ctx.c has goto labels crossing outside of switch arms

Greg Hudson via RT


the copy_subkey label in the switch statement that decides what gssapi
algorithm we are using needs to be factored out.

Currently if you remove the des arm of the switch, the rest of the
switch statement breaks because there is a goto back into that block.

Please factor this out of the switch statement.

_______________________________________________
krb5-bugs mailing list
[hidden email]
https://mailman.mit.edu/mailman/listinfo/krb5-bugs
Reply | Threaded
Open this post in threaded view
|

Re: [krbdev.mit.edu #3181] init_ctx.c has goto labels crossing outside of switch arms

Greg Hudson via RT
On Sep 21, 2005, at 13:48, Sam Hartman via RT wrote:

> the copy_subkey label in the switch statement that decides what gssapi
> algorithm we are using needs to be factored out.
>

Yes.


> Currently if you remove the des arm of the switch, the rest of the
> switch statement breaks because there is a goto back into that block.
>

As I said in person, I disagree that you should necessarily always be  
able to do this.  Sometimes common code for a subset of the arms of a  
switch is reasonable thing to do.  (Maybe not in this case, but I  
don't agree with the assumption.)


> Please factor this out of the switch statement.
>

We could also clean up a lot of code here if we actually decide to  
nuke the sort-of-rfc1964 "big endian" support.  That's a lot more  
interesting than one minor switch statement....

Ken


_______________________________________________
krb5-bugs mailing list
[hidden email]
https://mailman.mit.edu/mailman/listinfo/krb5-bugs