diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2005-07-31 00:59:21 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2005-07-31 00:59:21 +0000 |
commit | 71d037bd4cca897be2cdc96c8165593ddabdf71a (patch) | |
tree | df0e1566d6bb0232c36195e2c259c38e730cb6fd | |
parent | 92cadeb1565154cafec09b0fb3f036cee1b018a7 (diff) | |
download | fetchmail-71d037bd4cca897be2cdc96c8165593ddabdf71a.tar.gz fetchmail-71d037bd4cca897be2cdc96c8165593ddabdf71a.tar.bz2 fetchmail-71d037bd4cca897be2cdc96c8165593ddabdf71a.zip |
Kill alloca().
svn path=/trunk/; revision=4201
-rw-r--r-- | options.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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: |