diff options
author | imp <imp@FreeBSD.org> | 1997-03-31 04:51:13 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1997-03-31 04:51:13 +0000 |
commit | db8be68e5341967dd844a8c31fcab2983b5afb91 (patch) | |
tree | 70ad78c89481ba6b456d6ae8729f6a244ab80bcc /lib/libc/stdtime | |
parent | 0e8cd04444ddf0aae54a2fff1f5936543cac9281 (diff) | |
download | FreeBSD-src-db8be68e5341967dd844a8c31fcab2983b5afb91.zip FreeBSD-src-db8be68e5341967dd844a8c31fcab2983b5afb91.tar.gz |
Revert my last few changes. They were bogus. Replaced them with
the original text plus a statement saying that if strftime fails,
the results are undefined.
Requested a long time ago by: bde
Diffstat (limited to 'lib/libc/stdtime')
-rw-r--r-- | lib/libc/stdtime/strftime.3 | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/libc/stdtime/strftime.3 b/lib/libc/stdtime/strftime.3 index ba2d1a0..f3709fb 100644 --- a/lib/libc/stdtime/strftime.3 +++ b/lib/libc/stdtime/strftime.3 @@ -66,24 +66,14 @@ and one other character. .Pp No more than .Fa maxsize -characters will be placed into the array. If more characters than -.Fa maxsize -could have been written into -.Fa buf -then -.Fa bug -will not be -.Sq Li \&\e0 -terminated. +characters will be placed into the array. If the total number of resulting characters, including the terminating -.Sq Li \&\e0 -character, is not more than +null character, is not more than .Fa maxsize , .Fn strftime returns the number of characters in the array, not counting the -terminating -.Sq Li \&\e0 . -Otherwise, zero is returned. +terminating null. +Otherwise, zero is returned and the contents of the buffer are undefined. .Pp Each conversion specification is replaced by the characters as follows which are then copied into the buffer. |