Git development
 help / color / mirror / Atom feed
From: "Morten Welinder" <mwelinder@gmail.com>
To: "GIT Mailing List" <git@vger.kernel.org>
Subject: realloc
Date: Fri, 7 Apr 2006 16:11:21 -0400	[thread overview]
Message-ID: <118833cc0604071311v1da93f83n112cc2ea44552ca9@mail.gmail.com> (raw)

I could be wrong, but shouldn't

      var = realloc (var, whatever);

be changed to call xrealloc?  That, or assign to a different variable and check
for NULL.

This should affect the last four hits below.

M.




/scratch/welinder/git> grep -w realloc *.c
daemon.c:               newlist = realloc(socklist, sizeof(int) *
(socknum + 1));
diff-delta.c:                           out = realloc(out, outsize);
git.c:          cmdname = realloc(cmdname, cmdname_alloc * sizeof(*cmdname));
ls-files.c:             which->excludes = realloc(which->excludes,
sha1_file.c:                            buf = realloc(buf, size);

             reply	other threads:[~2006-04-07 20:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-07 20:11 Morten Welinder [this message]
2006-04-07 20:35 ` realloc Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=118833cc0604071311v1da93f83n112cc2ea44552ca9@mail.gmail.com \
    --to=mwelinder@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox