aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coregrind/m_libcbase.c1
-rw-r--r--include/pub_tool_libcbase.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/coregrind/m_libcbase.c b/coregrind/m_libcbase.c
index 4a5309522..cd620cc97 100644
--- a/coregrind/m_libcbase.c
+++ b/coregrind/m_libcbase.c
@@ -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;
diff --git a/include/pub_tool_libcbase.h b/include/pub_tool_libcbase.h
index cc1a55e37..f9d0eeec5 100644
--- a/include/pub_tool_libcbase.h
+++ b/include/pub_tool_libcbase.h
@@ -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