[PATCH] Fix gencat (take 2)

Ulrich Drepper drepper@redhat.com
Sat Dec 16 00:46:00 GMT 2000


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   `------------------------


More information about the Libc-hacker mailing list