]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/signal.c
Replace explicit checks for "/" with calls to IsPathSeparator, strchr with first_path...
[bacula/bacula] / bacula / src / lib / signal.c
index 50bfcc21b93439d95075e1e682827d13dfa420c1..18b4e797e92c5dc7ebcbb86d76a5451befb0bf27 100644 (file)
@@ -112,12 +112,12 @@ extern "C" void signal_handler(int sig)
          bstrncpy(btpath, "btraceback", sizeof(btpath));
       } else {
          bstrncpy(btpath, exepath, sizeof(btpath));
-         if (btpath[exelen-1] == '/') {
+         if (IsPathSeparator(btpath[exelen-1])) {
             btpath[exelen-1] = 0;
          }
          bstrncat(btpath, "/btraceback", sizeof(btpath));
       }
-      if (exepath[exelen-1] != '/') {
+      if (!IsPathSeparator(exepath[exelen - 1])) {
          strcat(exepath, "/");
       }
       strcat(exepath, exename);