Hi, On Sat, 4 Dec 1999, Christopher T. Lansdown wrote: [ugly code] > I.e. realloc can fail and this is never checked for. If it does, this code > will result in a segfault. Of course, It's primarily going to fail when > there isn't enough memory to do this, so it might be considered viable to > not handle this error condition, but it would seem nicer to handle it > gracefully. Agreed. I just had another glance at the glib API description, and it seems that the g_malloc(), g_malloc0() and g_realloc() functions already provide memory allocation functions with built-in checks for NULL. They abort gracefully, and this is the only sane action to do in that case (generally, at least), so I'd say that we should just use them. Any objections? llap, Christoph
- question about code in send_selector Christopher T. Lansdown
- Re: question about code in send_selector Rink Springer
- Re: question about code in send_selector Christoph Reichenbach
- Re: question about code in send_selector Christopher T. Lansdown
- Re: question about code in send_selector Christoph Reichenbach
- Re: question about code in send_selector Rink Springer
- Re: question about code in send_selector Christoph Reichenbach
- Re: question about code in send_selector Rink Springer
- Re: question about code in send_selector Christopher T. Lansdown
- Re: question about code in send_selector Christoph Reichenbach
- Re: question about code in send_selector Christopher T. Lansdown
- Re: question about code in send_selector Christoph Reichenbach
- Re: question about code in send_selector Christopher T. Lansdown
