first stab at simple mailer

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Fri Mar 23 04:57:57 PDT 2007


Alexander Shiryaev wrote:
 > comments welcome!  (and contributions as well)
Don't use GOTO.
why not?  simple cases of goto tend to be easily understandable, yet doing it without goto often tends to be spaghetti-if()s.

    it->sender = sender;
    host = strrchr(it->addr, '@');
    if ((host != NULL) && (strcmp(host + 1, "localhost") != 0) && 
(strcmp(host + 1, hostname()) != 0)) {
however, this for sure is nicer.  the other code grew a little bit :)

cheers
 simon
--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00026.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20070323/4844f019/attachment-0020.obj>


More information about the Kernel mailing list