summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-07-07 22:02:14 +0200
committerJunio C Hamano <gitster@pobox.com>2016-07-07 14:05:59 -0700
commit90833e4a5ae458a64f0fbc4d8e42a9587acfe7b6 (patch)
treedb2dd7475d7dfc6003c80fd4969ab2a22eb8c8cc
parent0b65a8dbdb38962e700ee16776a3042beb489060 (diff)
downloadgit-rs/am-ignore-retval-of-write-file.tar.gz
am: ignore return value of write_file()rs/am-ignore-retval-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 pretenting we care and make them void. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/am.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/builtin/am.c b/builtin/am.c
index d003939bc5..cbadb839e2 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");
}
/**