example: fix formatting nits

Also:
- drop non-portable `__STRING()` macro use where still used.

Closes #19746
This commit is contained in:
Viktor Szakats 2025-11-28 14:19:18 +01:00
parent c10dda9ebb
commit aad3c2e8e1
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
50 changed files with 225 additions and 227 deletions

View file

@ -65,9 +65,9 @@
/* seek callback function */
static int my_seek(void *userp, curl_off_t offset, int origin)
{
FILE *fp = (FILE *) userp;
FILE *fp = (FILE *)userp;
if(fseek(fp, (long) offset, origin) == -1)
if(fseek(fp, (long)offset, origin) == -1)
/* could not seek */
return CURL_SEEKFUNC_CANTSEEK;
@ -128,13 +128,13 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_cb);
/* which file to upload */
curl_easy_setopt(curl, CURLOPT_READDATA, (void *) fp);
curl_easy_setopt(curl, CURLOPT_READDATA, (void *)fp);
/* set the seek function */
curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, my_seek);
/* pass the file descriptor to the seek callback as well */
curl_easy_setopt(curl, CURLOPT_SEEKDATA, (void *) fp);
curl_easy_setopt(curl, CURLOPT_SEEKDATA, (void *)fp);
/* enable "uploading" (which means PUT when doing HTTP) */
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);