This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Fix gencat (take 2)


Jakub Jelinek <jakub@redhat.com> writes:

> y = obstack_alloc (x, n);
> ...
> obstack_free (x, y);
> z = obstack_alloc (x, m);
> that if m <= n, then z == y.

Writing like this only calls for errors.  Why don't use simply use

  obstack_blank (x, y);
  ...
  obstack_blank (x, m - y);
  z = obstack_finish (x);


This will always work.  I'll try to handle your patch this way in case
you don't beat me.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]