From 3d18b18de2e63eadc6a8dd2c375e16f7c7abadc8 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 16 Sep 2008 19:29:51 +0200 Subject: [PATCH] RTrim strings. Signed-off-by: Florent Bruneau --- postlicyd/config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postlicyd/config.c b/postlicyd/config.c index 0bd69e2..d964aaa 100644 --- a/postlicyd/config.c +++ b/postlicyd/config.c @@ -264,6 +264,9 @@ config_t *config_read(const char *file) if (escaped) { \ ADD_IN_BUFFER(Buffer, Len, '\\'); \ } \ + while ((Len) > 0 && isspace((Buffer)[(Len) - 1])) { \ + (Buffer)[--(Len)] = '\0'; \ + } \ } \ READ_NEXT(OnEOF); \ } while(0) -- 2.20.1