summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/am.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 9c576779c3..486ff594d7 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -199,19 +199,13 @@ static inline const char *am_path(const struct am_state *state, const char *path
static int write_state_text(const struct am_state *state,
const char *name, const char *string)
{
- const char *fmt;
-
- if (*string && string[strlen(string) - 1] != '\n')
- fmt = "%s\n";
- else
- fmt = "%s";
- return write_file(am_path(state, name), fmt, string);
+ return write_file(am_path(state, name), "%s", string);
}
static int write_state_count(const struct am_state *state,
const char *name, int value)
{
- return write_file(am_path(state, name), "%d\n", value);
+ return write_file(am_path(state, name), "%d", value);
}
static int write_state_bool(const struct am_state *state,