X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Frandom.cpp;fp=src%2Fcommon%2Frandom.cpp;h=ec74688ec976df098f60ea330b3a7ae4eb4903e2;hb=5b9eda8a30a21a1c9de4572dd2b397c7cf923fa1;hp=5a038a563e12b339a25f307cf4e83cc12c6d1bfc;hpb=64f8e4936e6d54cff9c1f6d642a1b6745b7984d9;p=lttng-tools.git diff --git a/src/common/random.cpp b/src/common/random.cpp index 5a038a563..ec74688ec 100644 --- a/src/common/random.cpp +++ b/src/common/random.cpp @@ -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())