commit 6c6ad9710c6b04220ed6a50c2875be290d2ffc99
Author: Oswald Buddenhagen <[email protected]>
Date: Sun Dec 8 09:51:31 2013 +0100
less spaghetti
src/main.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/main.c b/src/main.c
index 292ec5f..780f648 100644
--- a/src/main.c
+++ b/src/main.c
@@ -622,24 +622,21 @@ sync_chans( main_vars_t *mvars, int ent )
printf( "%s:\n", mvars->chan->name );
syncml:
mvars->done = mvars->cben = 0;
- syncmlx:
if (mvars->boxlist) {
- if ((mbox = mvars->cboxes)) {
+ while ((mbox = mvars->cboxes)) {
mvars->cboxes = mbox->next;
if (sync_listed_boxes( mvars, mbox ))
goto syncw;
- goto syncmlx;
}
for (t = 0; t < 2; t++)
- if ((mbox = mvars->boxes[t])) {
+ while ((mbox = mvars->boxes[t])) {
mvars->boxes[t] = mbox->next;
if ((mvars->chan->ops[1-t] &
OP_MASK_TYPE) && (mvars->chan->ops[1-t] & OP_CREATE)) {
if (sync_listed_boxes( mvars,
mbox ))
goto syncw;
- goto syncmlx;
+ } else {
+ free( mbox );
}
- free( mbox );
- goto syncmlx;
}
} else {
if (!mvars->list) {
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel