pike.git / src / post_modules / Shuffler / b_source_normal_file.c

version» Context lines:

pike.git/src/post_modules/Shuffler/b_source_normal_file.c:6:      #include "global.h"   #include "bignum.h"   #include "object.h"   #include "interpret.h"   #include "threads.h"      #include "fdlib.h"   #include "fd_control.h"    - #include <sys/types.h> +    #include <sys/stat.h>      #include "shuffler.h"      #define CHUNK 8192         /* Source: Normal file    * Argument: Stdio.File instance pointing to a normal file    */
pike.git/src/post_modules/Shuffler/b_source_normal_file.c:89:    PIKE_STAT_T st;    if(TYPEOF(*s) != PIKE_T_OBJECT)    return 0;       if(!is_stdio_file(s->u.object))    return 0;       if (find_identifier("query_fd", s->u.object->prog) < 0)    return 0;    -  res = malloc( sizeof( struct fd_source ) ); -  MEMSET( res, 0, sizeof( struct fd_source ) ); +  res = calloc( 1, sizeof( struct fd_source ) ); +  if( !res ) return NULL;       apply( s->u.object, "query_fd", 0 );    res->fd = Pike_sp[-1].u.integer;    pop_stack();    res->s.get_data = get_data;    res->s.free_source = free_source;    res->obj = s->u.object;    add_ref(res->obj);       if( fd_fstat( res->fd, &st ) < 0 )