]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
posix: Add nonnull attribute to glob_pattern_p.
authorCollin Funk <collin.funk1@gmail.com>
Sat, 7 Jun 2025 23:20:27 +0000 (16:20 -0700)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 18 Jun 2025 18:57:13 +0000 (15:57 -0300)
* posix/glob.h (glob_pattern_p): Add __nonnull ((1)) since this function
expects a string and does not check for NULL.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
posix/glob.h

index 6bb0c6f5844201b5ca850bbb04f6c67bfc6fa9b8..e5442dd9c177e265b1c1b43aa54c665b4e74b0bb 100644 (file)
@@ -195,7 +195,8 @@ extern void globfree64 (glob64_t *__pglob) __THROW;
 
    This function is not part of the interface specified by POSIX.2
    but several programs want to use it.  */
-extern int glob_pattern_p (const char *__pattern, int __quote) __THROW;
+extern int glob_pattern_p (const char *__pattern, int __quote) __THROW
+       __nonnull ((1));
 #endif
 
 __END_DECLS