]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Declared those function arguments that are not modified as const.
authorBart Van Assche <bvanassche@acm.org>
Mon, 23 Feb 2009 19:12:02 +0000 (19:12 +0000)
committerBart Van Assche <bvanassche@acm.org>
Mon, 23 Feb 2009 19:12:02 +0000 (19:12 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9245

coregrind/m_oset.c
include/pub_tool_oset.h

index aeb7341b14860d13b57b75b0a7d52dca2d9e8e85..27ede919b56e5e64d7e9aba07601a2a78065c994 100644 (file)
@@ -174,7 +174,7 @@ void* fast_key_of_node(AvlNode* n)
 }
 
 // Compare the first word of each element.  Inlining is *crucial*.
-static inline Word fast_cmp(void* k, AvlNode* n)
+static inline Word fast_cmp(const void* k, const AvlNode* n)
 {
    UWord w1 = *(UWord*)k;
    UWord w2 = *(UWord*)elem_of_node(n);
@@ -785,7 +785,7 @@ Bool VG_(OSetWord_Next)(AvlTree* t, UWord* val)
 // produced VG_(OSetGen_Next) is the smallest key in the map 
 // >= start_at.  Naturally ">=" is defined by the comparison 
 // function supplied to VG_(OSetGen_Create).
-void VG_(OSetGen_ResetIterAt)(AvlTree* oset, void* k)
+void VG_(OSetGen_ResetIterAt)(AvlTree* oset, const void* k)
 {
    Int     i;
    AvlNode *n, *t;
index c496523fb340d9740b58f569cf0626fb4ae2f931..d01e2f629665f2fd508eb45ccef32ba4a7414b6d 100644 (file)
@@ -250,7 +250,7 @@ extern void* VG_(OSetGen_Next)         ( OSet* os );
 // produced VG_(OSetGen_Next) is the smallest key in the map 
 // >= start_at.  Naturally ">=" is defined by the comparison 
 // function supplied to VG_(OSetGen_Create).
-extern void VG_(OSetGen_ResetIterAt) ( OSet* oset, void* key );
+extern void VG_(OSetGen_ResetIterAt) ( OSet* oset, const void* key );
 
 #endif   // __PUB_TOOL_OSET_H