소스 검색

[fix] set default parameter of "size".

liuxianliang 4 년 전
부모
커밋
fdb7270397
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      samples/webclient_shard_download_sample.c
  2. 1 0
      src/webclient.c

+ 2 - 1
samples/webclient_shard_download_sample.c

@@ -57,8 +57,9 @@ int webclient_shard_download_test(int argc, char **argv)
     struct webclient_session* session = RT_NULL;
     rt_err_t result = RT_EOK;
     char *uri = RT_NULL;
-    int length, size = 0;
+    int length = 0;
     int usage_flag = 0;
+    int size = 200;
 
 
     if (argc == 1)

+ 1 - 0
src/webclient.c

@@ -1050,6 +1050,7 @@ int webclient_shard_position_function(struct webclient_session *session, const c
 
     RT_ASSERT(session);
     RT_ASSERT(URI);
+    RT_ASSERT(mem_size);
 
     /* set the offset of "Range" and "total_len"  */
     end_position = start;