diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-07-26 14:27:45 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-07-26 18:20:03 +0200 |
commit | 17c7a56d14878601d5ea722ef7917e515640b4d7 (patch) | |
tree | ea9b9a564c16109e00bf3fdbbe2eb7640b4bfb5f /docs | |
parent | b045a7d77c715f16eb3a614adefa9b772c1c75a8 (diff) | |
download | curl-17c7a56d14878601d5ea722ef7917e515640b4d7.tar.gz |
example/cookie_interface: fix scan-build printf warning
Follow-up to 4b79c4fb565
Fixes #7497
Closes #7498
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples/cookie_interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c index fb2b9fb7c..fb76ae927 100644 --- a/docs/examples/cookie_interface.c +++ b/docs/examples/cookie_interface.c @@ -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!"); |