1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-11 12:05:06 -05:00
Commit Graph

28 Commits

Author SHA1 Message Date
Viktor Szakats
efc696a2e0 docs/examples: URL updates
- also update two URLs outside of docs/examples
- fix spelling of filename persistant.c
- fix three long lines that started failing checksrc.pl

Closes https://github.com/curl/curl/pull/3036
2018-09-23 09:23:29 +00:00
Kruzya
23524bf85b examples: Fix memory leaks from realloc errors
Make sure to not overwrite the reallocated pointer in realloc() calls
to avoid a memleak on memory errors.
2018-09-17 14:07:47 +02:00
Marcel Raad
5bd8c389a3
examples: fix -Wformat warnings
When size_t is not a typedef for unsigned long (as usually the case on
Windows), GCC emits -Wformat warnings when using lu and lx format
specifiers with size_t. Silence them with explicit casts to
unsigned long.

Closes https://github.com/curl/curl/pull/2721
2018-07-09 18:08:27 +02:00
Rikard Falkeborn
13505dcb55
examples: Fix format specifiers
Closes #2561
2018-05-14 09:43:15 +02:00
Daniel Stenberg
4af40b3646 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
Daniel Stenberg
0e7d76d6a8 examples: more descriptions 2015-06-18 11:38:54 +02:00
Markus Elfring
29c655c0a6 Bug #149: Deletion of unnecessary checks before calls of the function "free"
The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first

This issue was fixed by using the software Coccinelle 1.0.0-rc24.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
2015-03-16 12:13:56 +01:00
Daniel Stenberg
4d7bf73fc3 getinmemory: remove a comment
The comment mentioned the need to free the data, but the example already
does that free
2013-09-29 00:16:21 +02:00
Cédric Deltheil
6645d2ae8f examples/getinmemory.c: abort the transfer if not enough memory
No more use exit(3) but instead tell libcurl that no byte has been
written to let it return a `CURLE_WRITE_ERROR`. In addition, check
curl easy handle return code.
2013-03-09 16:38:18 +01:00
Daniel Stenberg
450975b0c3 getinmemory.c: use better argument names for write callback 2011-09-07 22:43:28 +02:00
Daniel Stenberg
1aeb635cdd sources: update source headers
All C and H files now (should) feature the proper project curl source
code header, which includes basic info, a copyright statement and some
basic disclaimers.
2011-03-10 12:04:33 +01:00
Daniel Stenberg
9583b4af90 examples: fix compiler warnings 2010-12-17 23:34:26 +01:00
Daniel Stenberg
18e7b52e8e examples: use example.com in example URLs 2010-10-05 15:00:19 +02:00
James Bursa
fbefd816e4 getinmemory: make the example easier to follow
1. Remove the comment warning that it's "not been verified to work". It
   works with no problems in my testing.

2. Remove 2 unnecessary includes.

3. Remove the myrealloc(). Initialize chunk.memory with malloc() instead
   of NULL. The comments for these two parts contradicted each other.

4. Handle out of memory from realloc() instead of continuing.

5. Print a brief status message at the end.
2010-09-14 22:52:04 +02:00
Daniel Stenberg
2309b4e330 remove the CVSish $Id$ lines 2010-03-24 11:02:54 +01:00
Yang Tse
861b647e7b remove unnecessary typecasting of realloc() 2008-09-06 04:28:43 +00:00
Dan Fandrich
70f10f1ac9 Add a call to curl_global_cleanup to show how to do a proper shutdown. 2007-11-07 04:53:37 +00:00
Dan Fandrich
4706a93341 Fixed some more simple compile warnings in the examples. 2007-07-16 21:22:12 +00:00
Daniel Stenberg
ab1f5c3edd make it compile warning-free and free() the memory before exit 2005-10-10 20:58:18 +00:00
Daniel Stenberg
2248599ae1 fix type 2005-02-04 23:53:12 +00:00
Daniel Stenberg
186f433e40 modified to not use realloc() on a NULL pointer 2004-11-02 08:26:55 +00:00
Daniel Stenberg
a94e117ede language! 2004-05-19 09:09:31 +00:00
Daniel Stenberg
662cb30372 Set CURLOPT_USERAGENT too 2004-05-19 09:08:19 +00:00
Daniel Stenberg
f68219ddaa use the newer option names 2003-12-08 14:13:19 +00:00
Daniel Stenberg
4d28012468 remove the wrong win32 comment and use global_init 2003-11-19 08:19:20 +00:00
Daniel Stenberg
ebe5191b63 no the data is not freed, this is left for the app to do when needed 2003-03-10 17:01:11 +00:00
Daniel Stenberg
3ceb2bcbb9 this might actually compile too... 2001-05-15 13:04:53 +00:00
Daniel Stenberg
2457a31948 an example on how you can use the write callback to receive data in a memory
chunk
2001-05-15 13:03:53 +00:00