From 7669aeb15f95cb951a31d5e81b4baf9417f64e60 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Fri, 22 Dec 2023 11:51:43 +0100 Subject: [PATCH] parse_latestdigest: use chomp --- src/mlmmj.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mlmmj.c b/src/mlmmj.c index 6c6c41a0..6c63b913 100644 --- a/src/mlmmj.c +++ b/src/mlmmj.c @@ -85,9 +85,7 @@ parse_lastdigest(char *line, long *lastindex, time_t *lasttime, return true; } walk = walk + strlen(walk) + 1; - size_t l = strlen(walk) -1; - if (walk[l] == '\n') - walk[l] = '\0'; + chomp(walk); *lastissue = strtoim(walk, LONG_MIN, LONG_MAX, errstr); if (*errstr != NULL) { *errstr = "Invalid value for lastissue"; -- 2.47.2