From 8cf58297d9743bdbfdddb605cc9cefe0c6273ee5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 21 Jan 2010 18:45:21 +0100 Subject: TicketUploader and FileTransfer plugins: fixes after a round of testing for one, FileTransfer now would not use current dir as a storage for temp files. Signed-off-by: Denys Vlasenko --- src/Hooks/hooklib.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Hooks/hooklib.cpp') diff --git a/src/Hooks/hooklib.cpp b/src/Hooks/hooklib.cpp index 41b9627..06bde97 100644 --- a/src/Hooks/hooklib.cpp +++ b/src/Hooks/hooklib.cpp @@ -47,9 +47,7 @@ void parse_conf(const char *additional_conf, unsigned *setting_MaxCrashReportsSi break; } - unsigned len = strlen(line); - if (len > 0 && line[len-1] == '\n') - line[--len] = '\0'; + strchrnul(line, '\n')[0] = '\0'; const char *p = skip_whitespace(line); #undef DIRECTIVE #define DIRECTIVE "MaxCrashReportsSize" -- cgit