From 91a6ec8d07eb521fc3f9be3bf7b7ae36a6108c88 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 25 Aug 2015 10:49:06 +0100 Subject: [PATCH] gutils: Clarify return values of g_bit_nth_[lsf|msf]() Clarify in the documentation that both functions return -1 if no high bits could be found. --- glib/gutils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/glib/gutils.c b/glib/gutils.c index e229d0db1..360a4d5c8 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -493,7 +493,8 @@ g_find_program_in_path (const gchar *program) * from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63, * usually). To start searching from the 0th bit, set @nth_bit to -1. * - * Returns: the index of the first bit set which is higher than @nth_bit + * Returns: the index of the first bit set which is higher than @nth_bit, or -1 + * if no higher bits are set */ /** @@ -507,7 +508,8 @@ g_find_program_in_path (const gchar *program) * usually). To start searching from the last bit, set @nth_bit to * -1 or GLIB_SIZEOF_LONG * 8. * - * Returns: the index of the first bit set which is lower than @nth_bit + * Returns: the index of the first bit set which is lower than @nth_bit, or -1 + * if no lower bits are set */ /** -- 2.11.4.GIT