reiserfscore: constify struct pointer arguments

There are many cases where functions take pointers to keys, item heads,
paths, etc and don't modify them. Let's annotate them properly.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
Jeff Mahoney committed 2014-03-13 17:42:58 -04:00
1 parent 9b52a79ba2
commit 6daa8a9c5a
16 files changed
+97 -91

No files matched your search

+4 -4
View File
@@ -38,7 +38,7 @@
#include "includes.h"
/* Does the buffer contain a disk block which is in the tree. */
inline int B_IS_IN_TREE(struct buffer_head *p_s_bh)
inline int B_IS_IN_TREE(const struct buffer_head *p_s_bh)
{
return (get_blkh_level(B_BLK_HEAD(p_s_bh)) != FREE_LEVEL);
}
@@ -133,8 +133,8 @@ int comp_keys(const void *p1, const void *p2)
there are no possible items, and we have not found it. With each examination we
cut the number of possible items it could be by one more than half rounded down,
or we find it. */
int bin_search(void *p_v_key, /* Key to search for. */
void *p_v_base, /* First item in the array. */
int bin_search(const void *p_v_key, /* Key to search for. */
const void *p_v_base, /* First item in the array. */
int p_n_num, /* Number of items in the array. */
int p_n_width, /* Item size in the array.
searched. Lest the reader be
@@ -318,7 +318,7 @@ void pathrelse(struct reiserfs_path *p_s_search_path)
key. search_by_key returns a path that must be checked for the
correctness of the top of the path but need not be checked for the
correctness of the bottom of the path */
int search_by_key(reiserfs_filsys_t fs, struct reiserfs_key *p_s_key, /* Key to search */
int search_by_key(reiserfs_filsys_t fs, const struct reiserfs_key *p_s_key, /* Key to search */
struct reiserfs_path *p_s_search_path, /* This structure was
allocated and
initialized by the