diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-09-07 22:43:28 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-09-07 22:43:28 +0200 |
commit | 450975b0c34bcc9659cbb963460b3e4d0df43543 (patch) | |
tree | 296ebd43321089de688ca74c1f183d847f21b7e1 /docs/examples | |
parent | 5658aa95741cc2d69f4a70d7e7ba6dfb773258e3 (diff) |
getinmemory.c: use better argument names for write callback
Diffstat (limited to 'docs/examples')
-rw-r--r-- | docs/examples/getinmemory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c index b5b34d4f0..78e6deb10 100644 --- a/docs/examples/getinmemory.c +++ b/docs/examples/getinmemory.c @@ -36,10 +36,10 @@ struct MemoryStruct { static size_t -WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) +WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp) { size_t realsize = size * nmemb; - struct MemoryStruct *mem = (struct MemoryStruct *)data; + struct MemoryStruct *mem = (struct MemoryStruct *)userp; mem->memory = realloc(mem->memory, mem->size + realsize + 1); if (mem->memory == NULL) { @@ -48,7 +48,7 @@ WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) exit(EXIT_FAILURE); } - memcpy(&(mem->memory[mem->size]), ptr, realsize); + memcpy(&(mem->memory[mem->size]), contents, realsize); mem->size += realsize; mem->memory[mem->size] = 0; |