Robert Millan wrote: > This makes it easier to import xgethostname.c into an external program.
What's the motivation? removing dependencies? > 2009-08-29 Robert Millan <[email protected]> > > * lib/xgethostname.c: Remove `"xalloc.h"'. > (xgethostname): Use realloc() instead of x2realloc(). > ... > - hostname = x2realloc (hostname, &size); > + tmp = realloc (hostname, size); > + if (! tmp) > + { > + perror ("realloc"); > + exit (1); You've removed an important bit of semantics here. x2realloc increases SIZE as well as calling realloc. Also, you've made it so upon failure it gives an inferior diagnostic, using perror, rather than "error".
