From 44d20ced5664d4648ba2ec56ba45db38595f7317 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Fri, 8 Nov 2013 14:28:40 +0100 Subject: rename_device: remove comments and trailing whitespaces --- src/rename_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rename_device.c b/src/rename_device.c index 8e28154d..bb5e6b8f 100644 --- a/src/rename_device.c +++ b/src/rename_device.c @@ -120,6 +120,14 @@ int isCfg(const struct dirent *dent) { } static inline char *dequote(char *start, char *end) { + char *c; + //remove comments and trailing whitespace + c = strchr(start, '#'); + if (c!=NULL) + *c='\0'; + + g_strchomp(start); + if (end==NULL) { end=start; while(*end) end++; -- cgit v1.2.1