From a22320f76d66db269cbb3e709a23231990bc9b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikolaj=20L=C3=B8bner=20Sheller?= Date: Fri, 10 Feb 2012 15:55:58 +0100 Subject: [PATCH] Mac: Fix return value for string functions get_serial_number() get_manufacturer_string() get_product_string() This is to match the documentation in the header file, returning 0 on success and -1 on error. --- mac/hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mac/hid.c b/mac/hid.c index 2f9282c..47ad049 100644 --- a/mac/hid.c +++ b/mac/hid.c @@ -291,10 +291,10 @@ static int get_string_property(IOHIDDeviceRef device, CFStringRef prop, wchar_t &used_buf_len); buf[chars_copied] = 0; - return chars_copied; + return 0; } else - return 0; + return -1; }