aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2005-07-31 00:59:21 +0000
committerMatthias Andree <matthias.andree@gmx.de>2005-07-31 00:59:21 +0000
commit71d037bd4cca897be2cdc96c8165593ddabdf71a (patch)
treedf0e1566d6bb0232c36195e2c259c38e730cb6fd
parent92cadeb1565154cafec09b0fb3f036cee1b018a7 (diff)
downloadfetchmail-71d037bd4cca897be2cdc96c8165593ddabdf71a.tar.gz
fetchmail-71d037bd4cca897be2cdc96c8165593ddabdf71a.tar.bz2
fetchmail-71d037bd4cca897be2cdc96c8165593ddabdf71a.zip
Kill alloca().
svn path=/trunk/; revision=4201
-rw-r--r--options.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/options.c b/options.c
index 01c64b6b..38c46eb5 100644
--- a/options.c
+++ b/options.c
@@ -472,33 +472,33 @@ struct query *ctl; /* option record to be initialized */
break;
case 'r':
case LA_FOLDER:
- xalloca(buf, char *, strlen(optarg) + 1);
- strcpy(buf, optarg);
+ buf = xstrdup(optarg);
cp = strtok(buf, ",");
do {
save_str(&ctl->mailboxes, cp, 0);
} while
((cp = strtok((char *)NULL, ",")));
+ free(buf);
break;
case 'S':
case LA_SMTPHOST:
- xalloca(buf, char *, strlen(optarg) + 1);
- strcpy(buf, optarg);
+ buf = xstrdup(optarg);
cp = strtok(buf, ",");
do {
save_str(&ctl->smtphunt, cp, TRUE);
} while
((cp = strtok((char *)NULL, ",")));
+ free(buf);
ocount++;
break;
case LA_FETCHDOMAINS:
- xalloca(buf, char *, strlen(optarg) + 1);
- strcpy(buf, optarg);
+ buf = xstrdup(optarg);
cp = strtok(buf, ",");
do {
save_str(&ctl->domainlist, cp, TRUE);
} while
((cp = strtok((char *)NULL, ",")));
+ free(buf);
break;
case 'D':
case LA_SMTPADDR:
@@ -509,8 +509,7 @@ struct query *ctl; /* option record to be initialized */
break;
case 'Z':
case LA_ANTISPAM:
- xalloca(buf, char *, strlen(optarg) + 1);
- strcpy(buf, optarg);
+ buf = xstrdup(optarg);
cp = strtok(buf, ",");
do {
struct idlist *idp = save_str(&ctl->antispam, NULL, 0);;
@@ -518,6 +517,7 @@ struct query *ctl; /* option record to be initialized */
idp->val.status.num = xatoi(cp, &errflag);
} while
((cp = strtok((char *)NULL, ",")));
+ free(buf);
break;
case 'b':
case LA_BATCHLIMIT: