about summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2023-03-12 01:08:10 +0100
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-03-31 10:31:14 -0300
commit09b382122288e706c5fa2c0412910f71c78b7d63 (patch)
tree33d2e3d662b1050c2daeac4c9f28e1587d528172 /time
parent113549d9fd5e0f9b9632214b74a3905a3d400fed (diff)
downloadglibc-09b382122288e706c5fa2c0412910f71c78b7d63.tar.gz
glibc-09b382122288e706c5fa2c0412910f71c78b7d63.tar.xz
glibc-09b382122288e706c5fa2c0412910f71c78b7d63.zip
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>
Diffstat (limited to 'time')
-rw-r--r--time/time.h3
1 files changed, 2 insertions, 1 deletions
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.