Improve example for "kernaux_printf"

This commit is contained in:
Alex Kotov 2020-12-07 05:07:19 +05:00
parent 0ce7f19b49
commit 8c7e4c4a49
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 2 additions and 2 deletions

View File

@ -20,8 +20,8 @@ int main()
{
memset(buffer, '\0', sizeof(buffer));
buffer_index = 0;
kernaux_printf(my_putchar, "Hello, %s!", "Alex");
assert(strcmp(buffer, "Hello, Alex!") == 0);
kernaux_printf(my_putchar, "Hello, %s! Session id: %u.", "Alex", 123);
assert(strcmp(buffer, "Hello, Alex! Session id: 123.") == 0);
printf("OK!\n");