{"thread":{"id":"5251","subject":"[PATCH 02/28] makes pprint_tag void","startedAt":"2006-08-14T20:19:15Z","lastAt":"2006-08-14T20:19:15Z","messageCount":1,"participants":["David Rientjes"],"isPatch":true,"patchVersion":1,"patchTotal":28},"messages":[{"id":"25282","messageId":"Pine.LNX.4.63.0608141318140.19383@chino.corp.google.com","threadId":"5251","inReplyTo":null,"subject":"[PATCH 02/28] makes pprint_tag void","fromName":"David Rientjes","fromEmail":"rientjes@google.com","sentAt":"2006-08-14T20:19:15Z","receivedAt":"2006-08-14T20:19:15Z","isPatch":true,"sender":{"key":"rientjes@google.com","avatar":null},"body":"Makes pprint_tag void and cleans up call in cmd_cat_file.\n\n\t\tDavid\n\nSigned-off-by: David Rientjes <rientjes@google.com>\n---\n builtin-cat-file.c |    9 +++++----\n 1 files changed, 5 insertions(+), 4 deletions(-)\n\ndiff --git a/builtin-cat-file.c b/builtin-cat-file.c\nindex 814fb07..df009ad 100644\n--- a/builtin-cat-file.c\n+++ b/builtin-cat-file.c\n@@ -26,7 +26,7 @@ static void flush_buffer(const char *buf\n \t}\n }\n \n-static int pprint_tag(const unsigned char *sha1, const char *buf, unsigned long size)\n+static void pprint_tag(const unsigned char *sha1, const char *buf, unsigned long size)\n {\n \t/* the parser in tag.c is useless here. */\n \tconst char *endp = buf + size;\n@@ -91,7 +91,6 @@ static int pprint_tag(const unsigned cha\n \t */\n \tif (cp < endp)\n \t\tflush_buffer(cp, endp - cp);\n-\treturn 0;\n }\n \n int cmd_cat_file(int argc, const char **argv, const char *prefix)\n@@ -145,8 +144,10 @@ int cmd_cat_file(int argc, const char **\n \t\tbuf = read_sha1_file(sha1, type, &size);\n \t\tif (!buf)\n \t\t\tdie(\"Cannot read object %s\", argv[2]);\n-\t\tif (!strcmp(type, tag_type))\n-\t\t\treturn pprint_tag(sha1, buf, size);\n+\t\tif (!strcmp(type, tag_type)) {\n+\t\t\tpprint_tag(sha1, buf, size);\n+\t\t\treturn 0;\n+\t\t}\n \n \t\t/* otherwise just spit out the data */\n \t\tbreak;\n-- \n1.4.2.g89bb-dirty\n"}]}