summaryrefslogtreecommitdiff
path: root/include/linux/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/string.h')
-rw-r--r--include/linux/string.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/string.h b/include/linux/string.h
index 929d05d1247c..0266dbdaa4cd 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -564,13 +564,14 @@ static inline bool strstarts(const char *str, const char *prefix)
/**
* strends - Check if a string ends with another string.
- * @str - NULL-terminated string to check against @suffix
- * @suffix - NULL-terminated string defining the suffix to look for in @str
+ * @str: NULL-terminated string to check against @suffix
+ * @suffix: NULL-terminated string defining the suffix to look for in @str
*
* Returns:
* True if @str ends with @suffix. False in all other cases.
*/
-static inline bool strends(const char *str, const char *suffix)
+static inline bool __attribute__((nonnull(1, 2)))
+strends(const char *str, const char *suffix)
{
unsigned int str_len = strlen(str), suffix_len = strlen(suffix);