cppcheck: don't check NULL pointer before freeing them
[lttng-tools.git] / src / lib / lttng-ctl / lttng-ctl.c
index 6bf19a46acadc97ee3815a91189835daa8e307ba..9ea891e92f980d037a47328a83ddeb79c4ec8c26 100644 (file)
@@ -636,9 +636,7 @@ end:
  */
 void lttng_destroy_handle(struct lttng_handle *handle)
 {
-       if (handle) {
-               free(handle);
-       }
+       free(handle);
 }
 
 /*
@@ -1399,7 +1397,7 @@ int lttng_session_daemon_alive(void)
                return ret;
        }
 
-       if (strlen(sessiond_sock_path) == 0) {
+       if (*sessiond_sock_path == '\0') {
                /*
                 * No socket path set. Weird error which means the constructor was not
                 * called.
This page took 0.02419 seconds and 4 git commands to generate.