From: Florent Bruneau Date: Tue, 16 Sep 2008 17:29:51 +0000 (+0200) Subject: RTrim strings. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=3d18b18de2e63eadc6a8dd2c375e16f7c7abadc8;p=apps%2Fpfixtools.git RTrim strings. Signed-off-by: Florent Bruneau --- 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)