RTrim strings.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 16 Sep 2008 17:29:51 +0000 (19:29 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 16 Sep 2008 17:29:51 +0000 (19:29 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
postlicyd/config.c

index 0bd69e2..d964aaa 100644 (file)
@@ -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)