aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_y.y
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-08-10 04:18:38 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-08-10 04:18:38 +0000
commit7bacc310d866ae2c2c5ff08e59aa85477933ad7e (patch)
treeec3b05cfc55947732bd3edf66cbee4a200d13d68 /rcfile_y.y
parent6de2b2b9e46e1f61cf49ad3ff2729a3654a2012e (diff)
downloadfetchmail-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.y29
1 files changed, 5 insertions, 24 deletions
diff --git a/rcfile_y.y b/rcfile_y.y
index 864b8dfc..5e8a470b 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -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);
}