From 524d78d6c7552cd4c44be7cea1ccc7cdbb11b490 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 5 Apr 2024 16:30:02 +0200 Subject: constify --- ot_mutex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ot_mutex.c') diff --git a/ot_mutex.c b/ot_mutex.c index 88a7af8..6457f29 100644 --- a/ot_mutex.c +++ b/ot_mutex.c @@ -36,8 +36,8 @@ ot_vector *mutex_bucket_lock( int bucket ) { return all_torrents + bucket; } -ot_vector *mutex_bucket_lock_by_hash( ot_hash hash ) { - return mutex_bucket_lock( uint32_read_big( (char*)hash ) >> OT_BUCKET_COUNT_SHIFT ); +ot_vector *mutex_bucket_lock_by_hash( ot_hash const hash ) { + return mutex_bucket_lock( uint32_read_big( (const char*)hash ) >> OT_BUCKET_COUNT_SHIFT ); } void mutex_bucket_unlock( int bucket, int delta_torrentcount ) { @@ -45,7 +45,7 @@ void mutex_bucket_unlock( int bucket, int delta_torrentcount ) { g_torrent_count += delta_torrentcount; } -void mutex_bucket_unlock_by_hash( ot_hash hash, int delta_torrentcount ) { +void mutex_bucket_unlock_by_hash( ot_hash const hash, int delta_torrentcount ) { mutex_bucket_unlock( uint32_read_big( (char*)hash ) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount ); } -- cgit v1.2.3