[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: malloc() patches round 3
From: |
Igor Khavkine |
Subject: |
Re: malloc() patches round 3 |
Date: |
Wed, 22 Aug 2001 10:18:10 -0400 |
User-agent: |
Mutt/1.3.20i |
On Wed, Aug 22, 2001 at 03:53:32PM +0200, Marcus Brinkmann wrote:
> On Wed, Aug 22, 2001 at 09:16:45AM -0400, Igor Khavkine wrote:
> > diff -rup /local/src/hurd.orig/utils/x.c hurd/utils/x.c
> > --- /local/src/hurd.orig/utils/x.c Tue Aug 27 14:27:31 1996
> > +++ hurd/utils/x.c Wed Aug 22 00:10:37 2001
> > @@ -148,8 +148,12 @@ void verify_passwd (const char *name, co
> > return; /* Already got this one. */
> >
> > if (name)
> > - asprintf (&prompt, "Password for %s%s:",
> > - is_group ? "group " : "", name);
> > + {
> > + asprintf (&prompt, "Password for %s%s:",
> > + is_group ? "group " : "", name);
> > + if (! prompt)
> > + prompt = "Password:";
> > + }
> > else
> > prompt = "Password:";
> >
>
> The C library manual says that asprintf returns -1 on error and suggests
> if (asprintf (...) < 0)
> ...
Right. This should go on top.
Igor
x.diff
Description: Text document
- malloc() patches round 3, Igor Khavkine, 2001/08/22
- Re: malloc() patches round 3, Marcus Brinkmann, 2001/08/22
- Re: malloc() patches round 3,
Igor Khavkine <=
- Re: malloc() patches round 3, Thomas Bushnell, BSG, 2001/08/22
- Re: malloc() patches round 3, Igor Khavkine, 2001/08/22
- Re: malloc() patches round 3, Thomas Bushnell, BSG, 2001/08/22
- Re: malloc() patches round 3, Igor Khavkine, 2001/08/22
- Re: malloc() patches round 3, Thomas Bushnell, BSG, 2001/08/22
- Re: malloc() patches round 3, Ognyan Kulev, 2001/08/23
- Re: malloc() patches round 3, Jeroen Dekkers, 2001/08/23
- Re: malloc() patches round 3, eric . rannaud . liste, 2001/08/24
- Re: malloc() patches round 3, Brent A. Fulgham, 2001/08/25
- Re: malloc() patches round 3, Chiaki Ishikawa, 2001/08/23