Mail Archives: djgpp/1998/08/07/11:54:48
Endlisnis <s257m AT unb DOT ca> wrote:
> Salvador Eduardo Tropea (SET) wrote:
>
> > 1) Don't allocate the memory before checking new_str.
> > > char *new_str;
> > > if (new_str == NULL) return NULL;
> > SET
>
> Isn't 'new_str' initalized to whatever happens to be in memory? Isn't the whole point to check to see if
> malloc was able to allocate the space? If so, how could you check for an error before the function is called?
I allready rectified it, is old_str ....
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013
- Raw text -