diff options
author | José Fonseca <jrfonseca@users.sourceforge.net> | 2003-07-03 18:25:53 +0000 |
---|---|---|
committer | José Fonseca <jrfonseca@users.sourceforge.net> | 2003-07-03 18:25:53 +0000 |
commit | 15ff73b9843c79c1709f4a521aaa09285105f8bc (patch) | |
tree | 207ebddf035d06172746ef77695f4c3de64f357f /parser.y | |
parent | 2867d16bc9bae9764904efbf44cd5131fca1bc9b (diff) |
Exit with an error code immediately whenever an error.
Extensive use of xmalloc and friends.
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -17,6 +17,7 @@ #include "main.h" #include "smtp.h" #include "local.h" +#include "xmalloc.h" /* parser reads these */ @@ -69,7 +70,7 @@ identity : IDENTITY map STRING { identity = identity_new(); identity_add(identity); - identity->address = strdup($3); + identity->address = xstrdup($3); } ; @@ -78,14 +79,14 @@ statement_list : statement ; /* future global options should also have the form SET <name> optmap <value> */ -statement : HOSTNAME map STRING { identity->host = strdup($3); } - | USERNAME map STRING { identity->user = strdup($3); } - | PASSWORD map STRING { identity->pass = strdup($3); } +statement : HOSTNAME map STRING { identity->host = xstrdup($3); } + | USERNAME map STRING { identity->user = xstrdup($3); } + | PASSWORD map STRING { identity->pass = xstrdup($3); } | STARTTLS map DISABLED { identity->starttls = Starttls_DISABLED; } | STARTTLS map ENABLED { identity->starttls = Starttls_ENABLED; } | STARTTLS map REQUIRED { identity->starttls = Starttls_REQUIRED; } - | CERTIFICATE_PASSPHRASE map STRING { identity->certificate_passphrase = strdup($3); } - | MDA map STRING { mda = strdup($3); } + | CERTIFICATE_PASSPHRASE map STRING { identity->certificate_passphrase = xstrdup($3); } + | MDA map STRING { mda = xstrdup($3); } ; %% |