diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-08-10 04:18:38 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-08-10 04:18:38 +0000 |
commit | 7bacc310d866ae2c2c5ff08e59aa85477933ad7e (patch) | |
tree | ec3b05cfc55947732bd3edf66cbee4a200d13d68 /rcfile_y.y | |
parent | 6de2b2b9e46e1f61cf49ad3ff2729a3654a2012e (diff) | |
download | fetchmail-7bacc310d866ae2c2c5ff08e59aa85477933ad7e.tar.gz fetchmail-7bacc310d866ae2c2c5ff08e59aa85477933ad7e.tar.bz2 fetchmail-7bacc310d866ae2c2c5ff08e59aa85477933ad7e.zip |
reset-server can't return an error condition, so don't pretend to catch it.
svn path=/trunk/; revision=1254
Diffstat (limited to 'rcfile_y.y')
-rw-r--r-- | rcfile_y.y | 29 |
1 files changed, 5 insertions, 24 deletions
@@ -41,7 +41,7 @@ static flag trailer; static void record_current(); static void user_reset(); -static int reset_server(char *name, int skip); +static void reset_server(char *name, int skip); /* using Bison, this arranges that yydebug messages will show actual tokens */ extern char * yytext; @@ -91,27 +91,9 @@ statement : SET LOGFILE MAP STRING {logfile = xstrdup($4);} | define_server serverspecs userspecs ; -define_server : POLL STRING { - if (!reset_server($2, FALSE)) - { - yyerror("duplicate entry name not allowed"); - YYERROR; - } - } - | SKIP STRING { - if (!reset_server($2, TRUE)) - { - yyerror("duplicate entry name not allowed"); - YYERROR; - } - } - | DEFAULTS { - if (!reset_server("defaults", FALSE)) - { - yyerror("can't have two default entries"); - YYERROR; - } - } +define_server : POLL STRING {reset_server($2, FALSE);} + | SKIP STRING {reset_server($2, TRUE);} + | DEFAULTS {reset_server("defaults", FALSE);} ; serverspecs : /* EMPTY */ @@ -339,7 +321,7 @@ const flag securecheck; /* check for a secure rc file? */ return(0); } -static int reset_server(char *name, int skip) +static void reset_server(char *name, int skip) /* clear the entire global record and initialize it with a new name */ { trailer = FALSE; @@ -347,7 +329,6 @@ static int reset_server(char *name, int skip) current.smtp_socket = -1; current.server.pollname = xstrdup(name); current.server.skip = skip; - return(TRUE); } |