Re: [Patch v8 01/18] parse_tag_line: use enum for return value.

Subject: Re: [Patch v8 01/18] parse_tag_line: use enum for return value.

Date: Sat, 22 Dec 2012 23:48:04 +0200

To: david@tethera.net, notmuch@notmuchmail.org

Cc: David Bremner

From: Jani Nikula


On Fri, 21 Dec 2012, david@tethera.net wrote:
> From: David Bremner <bremner@debian.org>
>
> This is essentially cosmetic, since success=0 is promised by
> the comments in tag-utils.h.

Squash this on top for completeness:

diff --git a/tag-util.c b/tag-util.c
index 12aab08..17d7ac2 100644
--- a/tag-util.c
+++ b/tag-util.c
@@ -47,7 +47,7 @@ parse_tag_line (void *ctx, char *line,
     line_for_error = talloc_strdup (ctx, line);
     if (line_for_error == NULL) {
 	fprintf (stderr, "Error: out of memory\n");
-	return -1;
+	return TAG_PARSE_OUT_OF_MEMORY;
     }
 
     /* remove leading space */

Thread: