Return values of malloc/strdup/... not checked (was Re: [patch] cdebconf and i18n)

2002-11-11 Thread Denis Barbier
On Tue, Nov 12, 2002 at 02:41:23AM +0900, Junichi Uekawa wrote: Why does it have to be char something[] when char * something will perfectly work ? I did not say it has to be a char[6], I do not care if someone wants to malloc it. Please use strdup and friends, or asprintf,

Re: Return values of malloc/strdup/... not checked (was Re: [patch] cdebconf and i18n)

2002-11-11 Thread Junichi Uekawa
Please use strdup and friends, or asprintf, or other kind of things that are less prone to break. Ok, I will use strdup. While we are on it, why are return values of allocation routines never checked? You could add checks, or use/define xstrdup to give some useful error message. They