[GRASS5] Strange exit() (xganim)

Brad Douglas rez at touchofmadness.com
Sat Jul 23 20:46:07 EDT 2005


Is there any particular reason for exit(0)?  Shouldn't it be exit(1)?

if(NULL == (tr = malloc(tsiz * sizeof(char)))){
    fprintf(stderr,"Unable to malloc.\n");
    exit (0);
}

Ideally, shouldn't this just be:

if (NULL == (tr = G_malloc(tsiz * sizeof(char))))
    G_fatal_error(_("Unable to allocate memory."));


-- 
Brad Douglas <rez at touchofmadness.com>




More information about the grass-dev mailing list