example/cookie_interface: fix scan-build printf warning

Follow-up to 4b79c4fb56

Fixes #7497
Closes #7498
This commit is contained in:
Daniel Stenberg 2021-07-26 14:27:45 +02:00
parent b045a7d77c
commit 17c7a56d14
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -69,7 +69,7 @@ main(void)
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
if(curl) {
char nline[256];
char nline[512];
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
@ -93,7 +93,7 @@ main(void)
#define snprintf _snprintf
#endif
/* Netscape format cookie */
snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%.0lf\t%s\t%s",
snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%.0f\t%s\t%s",
".example.com", "TRUE", "/", "FALSE",
difftime(time(NULL) + 31337, (time_t)0),
"PREF", "hello example, i like you very much!");