summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdtime
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2002-08-14 22:36:22 +0000
committerrobert <robert@FreeBSD.org>2002-08-14 22:36:22 +0000
commit6e77bfc7bdee4ede5316f67cff39a530b30b75b3 (patch)
tree17e7fb097f6077f09759ab1b7a4cfaada588c8d3 /lib/libc/stdtime
parent476f71cec5c3fe99336f1ccd95b06c67707cda4e (diff)
downloadFreeBSD-src-6e77bfc7bdee4ede5316f67cff39a530b30b75b3.zip
FreeBSD-src-6e77bfc7bdee4ede5316f67cff39a530b30b75b3.tar.gz
- Add the C99 'restrict' qualifier using the '__restrict' macro to
function prototype and definition of strptime(3). - Update the manual page.
Diffstat (limited to 'lib/libc/stdtime')
-rw-r--r--lib/libc/stdtime/strptime.32
-rw-r--r--lib/libc/stdtime/strptime.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/stdtime/strptime.3 b/lib/libc/stdtime/strptime.3
index e04678d..36ca7e0 100644
--- a/lib/libc/stdtime/strptime.3
+++ b/lib/libc/stdtime/strptime.3
@@ -36,7 +36,7 @@
.Sh SYNOPSIS
.In time.h
.Ft char *
-.Fn strptime "const char *buf" "const char *format" "struct tm *timeptr"
+.Fn strptime "const char *restrict buf" "const char *restrict format" "struct tm *restrict timeptr"
.Sh DESCRIPTION
The
.Fn strptime
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c
index b050f1a..be84482 100644
--- a/lib/libc/stdtime/strptime.c
+++ b/lib/libc/stdtime/strptime.c
@@ -517,7 +517,8 @@ label:
char *
-strptime(const char *buf, const char *fmt, struct tm *tm)
+strptime(const char *__restrict buf, const char *__restrict fmt,
+ struct tm *__restrict tm)
{
char *ret;
OpenPOWER on IntegriCloud