From dc4b4a61baac86bb75b0bdffb9ca45e90c4e194d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 28 Jun 2017 13:38:48 -0700 Subject: submodule--helper: do not call utf8_fprintf() unnecessarily The helper function utf8_fprintf(fp, ...) has exactly the same effect to the output stream fp as fprintf(fp, ...) does, and the only difference is that its return value counts in display columns consumed (assuming that the payload is encoded in UTF-8), as opposed to number of bytes. There is no reason to call it unless the caller cares about its return value. Signed-off-by: Junio C Hamano --- builtin/submodule--helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index dbe5699fe6..704df874d1 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -4,7 +4,6 @@ #include "quote.h" #include "pathspec.h" #include "dir.h" -#include "utf8.h" #include "submodule.h" #include "submodule-config.h" #include "string-list.h" @@ -298,7 +297,7 @@ static int module_list(int argc, const char **argv, const char *prefix) else printf("%06o %s %d\t", ce->ce_mode, sha1_to_hex(ce->sha1), ce_stage(ce)); - utf8_fprintf(stdout, "%s\n", ce->name); + fprintf(stdout, "%s\n", ce->name); } return 0; } @@ -887,7 +886,7 @@ static int update_clone(int argc, const char **argv, const char *prefix) return 1; for_each_string_list_item(item, &suc.projectlines) - utf8_fprintf(stdout, "%s", item->string); + fprintf(stdout, "%s", item->string); return 0; } -- cgit v1.2.1