lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1454940416-65974-1-git-send-email-andriy.shevchenko@linux.intel.com>
Date:	Mon,  8 Feb 2016 16:06:55 +0200
From:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	linux-kernel@...r.kernel.org
Cc:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v1 1/2] lib-string-introduce-match_string-helper fix

Fix return code to be -EINVAL instead of -ENODATA.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
 lib/string.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/string.c b/lib/string.c
index f2a8fa6..ed83562 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -637,7 +637,7 @@ EXPORT_SYMBOL(sysfs_streq);
  * @string:	string to match with
  *
  * Return:
- * index of a @string in the @array if matches, or %-ENODATA otherwise.
+ * index of a @string in the @array if matches, or %-EINVAL otherwise.
  */
 int match_string(const char * const *array, size_t n, const char *string)
 {
@@ -652,7 +652,7 @@ int match_string(const char * const *array, size_t n, const char *string)
 			return index;
 	}
 
-	return -ENODATA;
+	return -EINVAL;
 }
 EXPORT_SYMBOL(match_string);
 
-- 
2.7.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ