posix: Add nonnull attribute to glob_pattern_p.

* 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>
This commit is contained in:
Collin Funk 2025-06-07 16:20:27 -07:00 committed by Adhemerval Zanella
parent f165e244e4
commit c3b9abaf33
1 changed files with 2 additions and 1 deletions

View 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