public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] time: Fix strftime(3) API regarding nullability
@ 2023-03-31 13:36 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2023-03-31 13:36 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=09b382122288e706c5fa2c0412910f71c78b7d63

commit 09b382122288e706c5fa2c0412910f71c78b7d63
Author: Alejandro Colomar <alx.manpages@gmail.com>
Date:   Sun Mar 12 01:08:10 2023 +0100

    time: Fix strftime(3) API regarding nullability
    
    strftime(3) doesn't accept null pointers in any of the parameters.
    
    Cc: Paul Eggert <eggert@cs.ucla.edu>
    Signed-off-by: Alejandro Colomar <alx@kernel.org>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Diff:
---
 time/time.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/time/time.h b/time/time.h
index 4db274bd0c..368f4dc588 100644
--- a/time/time.h
+++ b/time/time.h
@@ -99,7 +99,8 @@ extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
    of characters written, or 0 if it would exceed MAXSIZE.  */
 extern size_t strftime (char *__restrict __s, size_t __maxsize,
 			const char *__restrict __format,
-			const struct tm *__restrict __tp) __THROW;
+			const struct tm *__restrict __tp)
+			__THROW __nonnull((1, 3, 4));
 
 #ifdef __USE_XOPEN
 /* Parse S according to FORMAT and store binary time information in TP.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-31 13:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-31 13:36 [glibc] time: Fix strftime(3) API regarding nullability Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).