Urs Janßen
2011-04-16 23:55:07 UTC
=== modified file 'src/newsrc.c'
--- src/newsrc.c 2011-01-25 19:04:15 +0000
+++ src/newsrc.c 2011-04-16 23:48:41 +0000
@@ -1193,6 +1193,7 @@
t_bool ret_code = FALSE;
t_bool sub_created = FALSE;
t_bool unsub_created = FALSE;
+ t_bool fs_error = FALSE;
if (no_write)
goto rewrite_group_done;
@@ -1250,21 +1251,22 @@
clearerr(fp_sub);
fclose(fp_sub);
}
- fp_sub = NULL;
+ fs_error = TRUE;
}
if ((err = ferror(fp_unsub)) || fclose(fp_unsub)) {
- if (fp_sub) /* didn't see and error above */
+ if (!fs_error) /* avoid repeatd error message */
error_message(2, _(txt_filesystem_full), NEWSRC_FILE);
if (err) {
clearerr(fp_unsub);
fclose(fp_unsub);
}
- fp_unsub = NULL;
+ fs_error = TRUE;
}
- if (fp_sub == NULL || fp_unsub == NULL)
- goto rewrite_group_done;
-
fp_sub = fp_unsub = NULL;
+
+ if (fs_error)
+ goto rewrite_group_done;
+
fclose(fp_in);
fp_in = NULL;
--- src/newsrc.c 2011-01-25 19:04:15 +0000
+++ src/newsrc.c 2011-04-16 23:48:41 +0000
@@ -1193,6 +1193,7 @@
t_bool ret_code = FALSE;
t_bool sub_created = FALSE;
t_bool unsub_created = FALSE;
+ t_bool fs_error = FALSE;
if (no_write)
goto rewrite_group_done;
@@ -1250,21 +1251,22 @@
clearerr(fp_sub);
fclose(fp_sub);
}
- fp_sub = NULL;
+ fs_error = TRUE;
}
if ((err = ferror(fp_unsub)) || fclose(fp_unsub)) {
- if (fp_sub) /* didn't see and error above */
+ if (!fs_error) /* avoid repeatd error message */
error_message(2, _(txt_filesystem_full), NEWSRC_FILE);
if (err) {
clearerr(fp_unsub);
fclose(fp_unsub);
}
- fp_unsub = NULL;
+ fs_error = TRUE;
}
- if (fp_sub == NULL || fp_unsub == NULL)
- goto rewrite_group_done;
-
fp_sub = fp_unsub = NULL;
+
+ if (fs_error)
+ goto rewrite_group_done;
+
fclose(fp_in);
fp_in = NULL;