File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 2424#include "lcerror.h"
2525#include "lcutils.h"
2626#include "lchttppost.h"
27- #include <stdio.h>
2827
2928#define LCURL_MULTI_NAME LCURL_PREFIX" Multi"
3029static const char * LCURL_MULTI = LCURL_MULTI_NAME ;
@@ -434,29 +433,24 @@ static int lcurl_opt_set_string_array_(lua_State *L, int opt){
434433 n = lua_rawlen (L , 2 );
435434 }
436435
437- fprintf (stderr , "\n>>> array size %d\n" , n );
438-
439436 if (n == 0 ){
440437 code = curl_multi_setopt (p -> curl , opt , 0 );
441438 }
442439 else {
443440 int i ;
444- char const * * val = malloc (sizeof (char * ) * (n + 1 ));
445- fprintf (stderr , ">>> allocate size %d: %p\n" , sizeof (char * ) * (n + 1 ), val );
446- if (!* val ){
441+ char const * * val = malloc (sizeof (char * ) * (n + 1 ));
442+ if (!val ){
447443 return lcurl_fail_ex (L , p -> err_mode , LCURL_ERROR_MULTI , CURLM_OUT_OF_MEMORY );
448444 }
449445 for (i = 1 ; i <= n ; ++ i ){
450446 lua_rawgeti (L , 2 , i );
451- fprintf (stderr , ">>> add string %s\n" , lua_tostring (L , -1 ));
452447 val [i - 1 ] = lua_tostring (L , -1 );
453448 lua_pop (L , 1 );
454449 }
455450 val [n ] = NULL ;
456451 code = curl_multi_setopt (p -> curl , opt , val );
457452 free ((void * )val );
458453 }
459- fprintf (stderr , ">>> setopt result %d\n" , code );
460454
461455 if (code != CURLM_OK ){
462456 return lcurl_fail_ex (L , p -> err_mode , LCURL_ERROR_MULTI , code );
You can’t perform that action at this time.
0 commit comments