From 060f38febbd01f1bb7e343bb33c85ff0aa0f30cd Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 15 Dec 2009 18:05:51 +0100 Subject: move misplaced comment Signed-off-by: Denys Vlasenko --- src/Daemon/MiddleWare.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 98feb7b8..eb60ce44 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -783,23 +783,24 @@ std::string getDebugDumpDir(const char *pUUID, static char *guess_app_path(const char* cmdline) { - const char *path_start = NULL; + const char *path_start; char *app_path = NULL; - // +1 to skip the space + path_start = strchr(cmdline, ' '); - /* we found space in cmdline, so it might contain - path to some script like: - /usr/bin/python /usr/bin/system-control-network - */ - if(path_start != NULL) + if (path_start != NULL) { - // skip the space + /* we found space in cmdline, so it might contain + path to some script like: + /usr/bin/python /usr/bin/system-control-network + */ + /* +1 to skip the space */ path_start++; /* if the string following the space doesn't start with '/' it's probably not a full path to app and we can't use it to determine the package name */ - if(*path_start == '/'){ + if (*path_start == '/') + { int len = strchrnul(path_start,' ') - path_start; // cut the cmdline arguments app_path = xstrndup(path_start, len); -- cgit