Clean-up: use const reference where possible
[lttng-tools.git] / src / common / random.cpp
index 5a038a563e12b339a25f307cf4e83cc12c6d1bfc..ec74688ec976df098f60ea330b3a7ae4eb4903e2 100644 (file)
@@ -170,7 +170,7 @@ lttng::random::seed_t lttng::random::produce_best_effort_random_seed()
 {
        try {
                return lttng::random::produce_true_random_seed();
-       } catch (std::exception& e) {
+       } catch (const std::exception& e) {
                WARN("%s",
                     fmt::format(
                             "Failed to produce a random seed using getrandom(), falling back to pseudo-random device seed generation which will block until its pool is initialized: {}",
@@ -184,7 +184,7 @@ lttng::random::seed_t lttng::random::produce_best_effort_random_seed()
                 * under some containerized environments.
                 */
                produce_random_seed_from_urandom();
-       } catch (std::exception& e) {
+       } catch (const std::exception& e) {
                WARN("%s",
                     fmt::format("Failed to produce a random seed from the urandom device: {}",
                                 e.what())
This page took 0.023366 seconds and 4 git commands to generate.