From 942570af3ff8ccfd50a4409e0bd79897a25eae98 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Sat, 29 Jun 2013 19:51:34 +0800 Subject: [PATCH] update gist files --- docs/README.md | 10 ++-------- docs/gist/client.c | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/docs/README.md b/docs/README.md index 8003237b..801792e1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -253,10 +253,7 @@ char* upload(Qiniu_Client* client, char* uptoken, const char* key, const char* l { Qiniu_Error err; Qiniu_Io_PutRet putRet; - Qiniu_Io_PutExtra extra; - Qiniu_Zero(extra); - extra.bucket = bucket; - err = Qiniu_Io_PutFile(client, &putRet, uptoken, key, localFile, &extra); + err = Qiniu_Io_PutFile(client, &putRet, uptoken, key, localFile, NULL); if (err.code != 200) { debug(client, err); return NULL; @@ -271,10 +268,7 @@ char* upload(Qiniu_Client* client, char* uptoken, const char* key, const char* l int simple_upload(Qiniu_Client* client, char* uptoken, const char* key, const char* localFile) { Qiniu_Error err; - Qiniu_Io_PutExtra extra; - Qiniu_Zero(extra); - extra.bucket = bucket; - err = Qiniu_Io_PutFile(client, NULL, uptoken, key, localFile, &extra); + err = Qiniu_Io_PutFile(client, NULL, uptoken, key, localFile, NULL); return err.code; } ``` diff --git a/docs/gist/client.c b/docs/gist/client.c index 2de4f019..8e35d7ae 100644 --- a/docs/gist/client.c +++ b/docs/gist/client.c @@ -17,10 +17,7 @@ char* upload(Qiniu_Client* client, char* uptoken, const char* key, const char* l { Qiniu_Error err; Qiniu_Io_PutRet putRet; - Qiniu_Io_PutExtra extra; - Qiniu_Zero(extra); - extra.bucket = bucket; - err = Qiniu_Io_PutFile(client, &putRet, uptoken, key, localFile, &extra); + err = Qiniu_Io_PutFile(client, &putRet, uptoken, key, localFile, NULL); if (err.code != 200) { debug(client, err); return NULL; @@ -33,10 +30,7 @@ char* upload(Qiniu_Client* client, char* uptoken, const char* key, const char* l int simple_upload(Qiniu_Client* client, char* uptoken, const char* key, const char* localFile) { Qiniu_Error err; - Qiniu_Io_PutExtra extra; - Qiniu_Zero(extra); - extra.bucket = bucket; - err = Qiniu_Io_PutFile(client, NULL, uptoken, key, localFile, &extra); + err = Qiniu_Io_PutFile(client, NULL, uptoken, key, localFile, NULL); return err.code; } /* @endgist */