diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-03-14 06:58:56 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-03-14 06:58:56 +0000 |
commit | ccbb762630c40bf6d64744f4707051db4c910fbe (patch) | |
tree | c0c003ebaa2fc659a6ef1be6866f55fa7a9f5982 | |
parent | ff0976ad08b3dda64a55daf19892367e1367cf22 (diff) | |
download | fetchmail-ccbb762630c40bf6d64744f4707051db4c910fbe.tar.gz fetchmail-ccbb762630c40bf6d64744f4707051db4c910fbe.tar.bz2 fetchmail-ccbb762630c40bf6d64744f4707051db4c910fbe.zip |
Make copying work.
svn path=/trunk/; revision=2828
-rw-r--r-- | fetchmail.c | 9 | ||||
-rw-r--r-- | uid.c | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/fetchmail.c b/fetchmail.c index 3cd8c0d6..0deb0598 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -759,15 +759,14 @@ int main(int argc, char **argv) static void list_merge(struct idlist **dstl, struct idlist **srcl, int force) { /* - * If force is off, modify h2 fields only when they're empty (treat h1 - * as defaults). If force is on, modify each h2 field whenever h1 - * is nonempty (treat h1 as an override). + * If force is off, modify dstl fields only when they're empty (treat srcl + * as defaults). If force is on, modify each dstl field whenever scrcl + * is nonempty (treat srcl as an override). */ - if (force ? !!srcl : !dstl) + if (force ? !!*srcl : !*dstl) { struct idlist *cpl = copy_str_list(*srcl); - free_str_list(dstl); append_str_list(dstl, &cpl); } } @@ -394,6 +394,7 @@ struct idlist *copy_str_list(struct idlist *idl) else { newnode = (struct idlist *)xmalloc(sizeof(struct idlist)); + memcpy(newnode, idl, sizeof(struct idlist)); newnode->next = copy_str_list(idl->next); return(newnode); } |