pike.git / src / modules / _Stdio / sendfile.c

version» Context lines:

pike.git/src/modules/_Stdio/sendfile.c:152:    */      static struct program *pike_sendfile_prog = NULL;      /*    * Struct init code.    */      static void init_pike_sendfile(struct object *UNUSED(o))   { -  MEMSET(THIS, 0, sizeof(struct pike_sendfile)); +  memset(THIS, 0, sizeof(struct pike_sendfile));       /* callback doesn't actually need to be initialized since it is a    * mapped variable, but since we just zapped it with zeroes we need    * to set the type to T_INT again.. /Hubbe    */    SET_SVAL(THIS->callback, T_INT, NUMBER_NUMBER, integer, 0);   }      static void exit_pike_sendfile(struct object *UNUSED(o))   {
pike.git/src/modules/_Stdio/sendfile.c:885:    /* In case the user has succeeded in initializing _callback    * before create() is called.    */    free_svalue(&(THIS->callback));    SET_SVAL(THIS->callback, T_INT, NUMBER_NUMBER, integer, 0);       /* NOTE: The references to the stuff in sf are held by the stack.    * This means that we can throw errors without needing to clean up.    */    -  MEMSET(&sf, 0, sizeof(struct pike_sendfile)); +  memset(&sf, 0, sizeof(struct pike_sendfile));    SET_SVAL(sf.callback, T_INT, NUMBER_NUMBER, integer, 0);       get_all_args("sendfile", args, "%A%O%l%l%A%o%*",    &(sf.headers), &(sf.from_file), &offset,    &len, &(sf.trailers), &(sf.to_file), &cb);       sf.offset = offset;    sf.len = len;       /* We need to give 'cb' another reference /Hubbe */