changeset 277:5f559921391a

minor refactorings and cleanups
author markus schnalke <meillo@marmaro.de>
date Mon, 06 Dec 2010 17:34:15 -0300
parents 1abc1faeb45d
children c35c59a36a2a
files src/queue.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/queue.c	Fri Dec 03 21:05:34 2010 -0300
+++ b/src/queue.c	Mon Dec 06 17:34:15 2010 -0300
@@ -92,13 +92,11 @@
 	gboolean ok = TRUE;
 
 	logwrite(LOG_NOTICE, "Starting queue run.\n");
-
 	msg_list = read_queue(FALSE);
-
-	if (msg_list != NULL) {
+	if (msg_list) {
 		ok = deliver_msg_list(msg_list, DLVR_ALL);
+		DEBUG(5) debugf("  deliver_msg_list() returned: %d\n", ok);
 		destroy_msg_list(msg_list);
-		DEBUG(5) debugf("  deliver_msg_list() returned: %d\n", ok);
 	}
 	logwrite(LOG_NOTICE, "Finished queue run.\n");
 
@@ -108,12 +106,14 @@
 gboolean
 queue_run_online()
 {
-	GList *msg_list = read_queue(FALSE);
+	GList *msg_list;
 	gboolean ok = TRUE;
 
 	logwrite(LOG_NOTICE, "Starting online queue run.\n");
-	if (msg_list != NULL) {
+	msg_list = read_queue(FALSE);
+	if (msg_list) {
 		ok = deliver_msg_list(msg_list, DLVR_ONLINE);
+		DEBUG(5) debugf("  deliver_msg_list() returned: %d\n", ok);
 		destroy_msg_list(msg_list);
 	}
 	logwrite(LOG_NOTICE, "Finished online queue run.\n");