Branch: Tag:

2015-05-19

2015-05-19 19:38:27 by Martin Nilsson <nilsson@opera.com>

realloc -> xrealloc

1: + /* -*- c -*- + || This file is part of Pike. For copyright information see COPYRIGHT. + || Pike is distributed under GPL, LGPL and MPL. See the file COPYING + || for more information. + */ +    /*! @module System    */   
148:    int s, n;    struct array * ph;    HANDLE nh; -  HANDLE * handles; +     h = get_storage(handle, Wnotify_NotificationHandle_program);    if(!h)    {
164:    {    s = n = THIS->handles_size || 1;    s*=2; -  handles = realloc(THIS->handles, sizeof(HANDLE) * s); -  if(!handles) -  { -  pop_stack(); -  Pike_error("add_handle: failed to allocate memory.\n"); +  THIS->handles = xrealloc(THIS->handles, sizeof(HANDLE) * s);    }    -  THIS->handles = handles; -  } -  +     THIS->handles[THIS->handles_used++] = nh;       pop_stack();