summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-07-08 09:08:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-08 16:47:28 (GMT)
commit1dad879a7b7b41381cf4ccf471dcab06993a131b (patch)
treebb1bf0561cb133131936399478386fb7c5529a9c /builtin
parentaabbd3f3c9dd17c414100d0e029f8a3d13673ab1 (diff)
downloadgit-1dad879a7b7b41381cf4ccf471dcab06993a131b.zip
git-1dad879a7b7b41381cf4ccf471dcab06993a131b.tar.gz
git-1dad879a7b7b41381cf4ccf471dcab06993a131b.tar.bz2
am: ignore return value of write_file()
write_file() either returns 0 or dies, so there is no point in checking its return value. The callers of the wrappers write_state_text(), write_state_count() and write_state_bool() consequently already ignore their return values. Stop pretending we care and make them void. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/am.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 3dfe70b..a974223 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -183,22 +183,22 @@ static inline const char *am_path(const struct am_state *state, const char *path
/**
* For convenience to call write_file()
*/
-static int write_state_text(const struct am_state *state,
- const char *name, const char *string)
+static void write_state_text(const struct am_state *state,
+ const char *name, const char *string)
{
- return write_file(am_path(state, name), "%s", string);
+ write_file(am_path(state, name), "%s", string);
}
-static int write_state_count(const struct am_state *state,
- const char *name, int value)
+static void write_state_count(const struct am_state *state,
+ const char *name, int value)
{
- return write_file(am_path(state, name), "%d", value);
+ write_file(am_path(state, name), "%d", value);
}
-static int write_state_bool(const struct am_state *state,
- const char *name, int value)
+static void write_state_bool(const struct am_state *state,
+ const char *name, int value)
{
- return write_state_text(state, name, value ? "t" : "f");
+ write_state_text(state, name, value ? "t" : "f");
}
/**