From 450975b0c34bcc9659cbb963460b3e4d0df43543 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Sep 2011 22:43:28 +0200 Subject: getinmemory.c: use better argument names for write callback --- docs/examples/getinmemory.c | 6 +++--- 1 file 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; -- cgit v1.2.3