Fix: atomic_long_add_unless() returns a boolean
[lttng-modules.git] / lttng-events.c
index 687e8bc1df1f2daa4a85152bf605c6966c115d0f..da1d38e67b5ef80e4d381f15ceed0097093837bd 100644 (file)
@@ -1120,8 +1120,8 @@ int lttng_session_list_tracker_pids(struct lttng_session *session)
                ret = PTR_ERR(tracker_pids_list_file);
                goto file_error;
        }
-       if (atomic_long_add_unless(&session->file->f_count,
-               1, INT_MAX) == INT_MAX) {
+       if (!atomic_long_add_unless(&session->file->f_count, 1, LONG_MAX)) {
+               ret = -EOVERFLOW;
                goto refcount_error;
        }
        ret = lttng_tracker_pids_list_fops.open(NULL, tracker_pids_list_file);
This page took 0.02374 seconds and 4 git commands to generate.