bug-hurd
[Top][All Lists]
Advanced

[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

Attachment: x.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]