Use empty strings instead of NULL in format_reply structure.
authorJameson Graef Rollins <jrollins@finestructure.net>
Thu, 26 May 2011 01:01:12 +0000 (18:01 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 27 May 2011 23:18:57 +0000 (16:18 -0700)
This keeps things consistent with notmuch-show, and prevents having to
check for the existence of the field pointer for simple string output
formats.

notmuch-reply.c
show-message.c

index 8c5e76ccc38993ccdc308b1ed53fef6d53f86ba0..79599358fa23c481e1e109735bb05627bc43bf70 100644 (file)
@@ -29,12 +29,12 @@ reply_part (GMimeObject *part,
            unused (int *part_count));
 
 static const notmuch_show_format_t format_reply = {
            unused (int *part_count));
 
 static const notmuch_show_format_t format_reply = {
-    NULL,
-       NULL, NULL,
-           NULL, NULL, NULL,
-           NULL, reply_part, NULL, NULL, NULL,
-       NULL, NULL,
-    NULL
+    "",
+       "", NULL,
+           "", NULL, "",
+           "", reply_part, NULL, "", "",
+       "", "",
+    ""
 };
 
 static void
 };
 
 static void
index 2ec9eca91d5095b8dd6409a98b743bc314c02a6b..32bb860f63dd8c86d54389d3d4333fde46956386 100644 (file)
@@ -46,7 +46,7 @@ show_message_part (GMimeObject *part,
     selected = (params->part <= 0 || state->part_count == params->part);
 
     if (selected || state->in_zone) {
     selected = (params->part <= 0 || state->part_count == params->part);
 
     if (selected || state->in_zone) {
-       if (!first && (params->part <= 0 || state->in_zone) && format->part_sep)
+       if (!first && (params->part <= 0 || state->in_zone))
            fputs (format->part_sep, stdout);
 
        format->part (part, &(state->part_count));
            fputs (format->part_sep, stdout);
 
        format->part (part, &(state->part_count));