Re: Bug in POP3 code
- From: Carlos Morgado <chbm chbm nu>
- To: Balsa List <balsa-list gnome org>
- Subject: Re: Bug in POP3 code
- Date: Sat, 6 Oct 2001 14:05:21 +0100
Em Sáb, 06 Out 2001 00:53:12 Gordon Oliver escreveu:
> This code is heinous. It should do the classic linux-kernel thing:
> status = pop_connect...
> if (status != POP_OK)
> goto conn_fail;
> status = pop_auth...
> if (status != POP_OK)
> goto cleanup_fail;
>
> ...
>
> close(s);
> return status;
>
> cleanup_fail:
> write("quit...
> ...
> close(s);
> // fall through
>
> conn_fail
kernel goto thing is heinous (as is most kernel code - that's why it breaks
gcc so often). it's just written that way to be fast and not give the
compiler smart ideas.
--
Carlos Morgado - chbm(at)chbm(dot)nu - http://chbm.nu/ -- gpgkey: 0x1FC57F0A
http://wwwkeys.pgp.net/ FP:0A27 35D3 C448 3641 0573 6876 2A37 4BB2 1FC5 7F0A
"Some people have told me they don't think a fat penguin really embodies the
grace of Linux, which just tells me they have never seen a angry penguin
charging at them in excess of 100mph. They'd be a lot more careful about what
they say if they had." -- Linus Torvalds
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]