On error negative value is passed to adapter_ready callback. This fix passing negative error code to strerror. --- android/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/main.c b/android/main.c index 93870d0..36cc8aa 100644 --- a/android/main.c +++ b/android/main.c @@ -465,8 +465,8 @@ static GOptionEntry options[] = { static void adapter_ready(int err) { - if (err) { - error("Adapter initialization failed: %s", strerror(err)); + if (err < 0) { + error("Adapter initialization failed: %s", strerror(-err)); exit(EXIT_FAILURE); } -- 1.8.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html