Skip to content

Commit d18a118

Browse files
committed
strftime
1 parent c0f5eca commit d18a118

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

c/strftime.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ int main(void) {
1010
time_t t = time(NULL);
1111
struct tm *tm = localtime(&t);
1212
char s[64];
13-
assert(strftime(s, sizeof(s), "%c", tm));
13+
size_t ret = strftime(s, sizeof(s), "%c", tm);
14+
assert(ret);
1415
printf("%s\n", s);
1516
return 0;
1617
}

0 commit comments

Comments
 (0)