From 71d037bd4cca897be2cdc96c8165593ddabdf71a Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 31 Jul 2005 00:59:21 +0000 Subject: Kill alloca(). svn path=/trunk/; revision=4201 --- options.c | 16 ++++++++-------- 1 file 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: -- cgit v1.2.3