]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add comment about log2().
authorNicholas Nethercote <njn@valgrind.org>
Thu, 22 Dec 2005 19:50:45 +0000 (19:50 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Thu, 22 Dec 2005 19:50:45 +0000 (19:50 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5408

coregrind/m_libcbase.c
include/pub_tool_libcbase.h

index 4a530952278b4e909de571aecbf33fe56c10d355..cd620cc9730ad6eef8aeb13c4e24b49cd3677dd6 100644 (file)
@@ -413,6 +413,7 @@ Int VG_(memcmp) ( const void* s1, const void* s2, SizeT n )
    Misc useful functions
    ------------------------------------------------------------------ */
 
+/* Returns the base-2 logarithm of x.  Returns -1 if x is not a power of two. */
 Int VG_(log2) ( Int x ) 
 {
    Int i;
index cc1a55e371a9407cfd1ba4bd90fbf465630c17fb..f9d0eeec5f9af27afc55d627019d8b8456c950c3 100644 (file)
@@ -111,7 +111,7 @@ extern Int   VG_(memcmp) ( const void* s1, const void* s2, SizeT n );
 extern void VG_(ssort)( void* base, SizeT nmemb, SizeT size,
                         Int (*compar)(void*, void*) );
 
-/* Returns the base-2 logarithm of x. */
+/* Returns the base-2 logarithm of x.  Returns -1 if x is not a power of two. */
 extern Int VG_(log2) ( Int x );
 
 // A pseudo-random number generator returning a random UInt.  If pSeed