Clean-up: use LTTNG_PATH_MAX rather than PATH_MAX
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.c
index 9112cd14e39cf37cafb1d904d3bada5042cfe00b..0db0eb17382077d34fd95e0790acba624047ad98 100644 (file)
@@ -4420,18 +4420,18 @@ int ust_app_start_trace(struct ltt_ust_session *usess, struct ust_app *app)
                        usess->consumer->dst.session_root_path[0] != '\0') {
                char *tmp_path;
 
-               tmp_path = zmalloc(PATH_MAX * sizeof(char));
+               tmp_path = zmalloc(LTTNG_PATH_MAX);
                if (!tmp_path) {
                        ERR("Alloc tmp_path");
                        goto error_unlock;
                }
-               ret = snprintf(tmp_path, PATH_MAX, "%s%s%s",
+               ret = snprintf(tmp_path, LTTNG_PATH_MAX, "%s%s%s",
                                usess->consumer->dst.session_root_path,
                                usess->consumer->chunk_path,
                                usess->consumer->subdir);
-               if (ret >= PATH_MAX) {
+               if (ret >= LTTNG_PATH_MAX) {
                        ERR("Local destination path exceeds the maximal allowed length of %i bytes (needs %i bytes) with path = \"%s%s%s\"",
-                                       PATH_MAX, ret,
+                                       LTTNG_PATH_MAX, ret,
                                        usess->consumer->dst.session_root_path,
                                        usess->consumer->chunk_path,
                                        usess->consumer->subdir);
This page took 0.024751 seconds and 4 git commands to generate.