Remove some calls to malloc_failure
authorTom Tromey <tromey@adacore.com>
Tue, 10 Dec 2019 18:19:23 +0000 (11:19 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 12 Dec 2019 19:36:57 +0000 (12:36 -0700)
commitd61df89700bcf1633ca9db0ea403c2108c3cac3e
treee9a230f46ba6995eb090ae026af1c6e46cf8ab97
parentdb3ad2f031d4da70db35977abbcede0399d81d6b
Remove some calls to malloc_failure

I noticed a couple of spots that call malloc_failure, but that don't
need to.

* In xml-support.c, "concat" uses xmalloc, so cannot return NULL.

* In utils.c, "buildargv" also uses xmalloc, so can only return NULL
  if the argument is empty.

Tested by the buildbot.

gdb/ChangeLog
2019-12-12  Tom Tromey  <tromey@adacore.com>

* xml-support.c (xml_fetch_content_from_file): Don't call
malloc_failure.
* utils.h (class gdb_argv): Remove malloc_failure comment.
* utils.c (gdb_argv::reset): Don't call malloc_failure.

Change-Id: I59483620deb6609ccf2f024d94a29113bb62d1a9
gdb/ChangeLog
gdb/utils.c
gdb/utils.h
gdb/xml-support.c
This page took 0.025676 seconds and 4 git commands to generate.