svn commit: r357536 - head/contrib/elftoolchain/libelftc
Mark Johnston
markj at FreeBSD.org
Tue Feb 4 21:16:17 UTC 2020
Author: markj
Date: Tue Feb 4 21:16:16 2020
New Revision: 357536
URL: https://svnweb.freebsd.org/changeset/base/357536
Log:
libelftc: Add a missing check for an error from vector_str_init().
While here consistently use the same spelling for such checks.
CID: 1376769
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/contrib/elftoolchain/libelftc/libelftc_dem_arm.c
head/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c
head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_arm.c
==============================================================================
--- head/contrib/elftoolchain/libelftc/libelftc_dem_arm.c Tue Feb 4 21:15:52 2020 (r357535)
+++ head/contrib/elftoolchain/libelftc/libelftc_dem_arm.c Tue Feb 4 21:16:16 2020 (r357536)
@@ -303,12 +303,11 @@ init_demangle_data(struct demangle_data *d)
d->type = ENCODE_FUNC;
- if (vector_str_init(&d->vec) == false)
+ if (!vector_str_init(&d->vec))
return (false);
- if (vector_str_init(&d->arg) == false) {
+ if (!vector_str_init(&d->arg)) {
vector_str_dest(&d->vec);
-
return (false);
}
Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c
==============================================================================
--- head/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c Tue Feb 4 21:15:52 2020 (r357535)
+++ head/contrib/elftoolchain/libelftc/libelftc_dem_gnu2.c Tue Feb 4 21:16:16 2020 (r357536)
@@ -389,12 +389,11 @@ init_demangle_data(struct demangle_data *d)
d->type = ENCODE_FUNC;
- if (vector_str_init(&d->vec) == false)
+ if (!vector_str_init(&d->vec))
return (false);
- if (vector_str_init(&d->arg) == false) {
+ if (!vector_str_init(&d->arg)) {
vector_str_dest(&d->vec);
-
return (false);
}
Modified: head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c
==============================================================================
--- head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Tue Feb 4 21:15:52 2020 (r357535)
+++ head/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Tue Feb 4 21:16:16 2020 (r357536)
@@ -1659,7 +1659,8 @@ cpp_demangle_read_local_name(struct cpp_demangle_data
if (*(++ddata->cur) == '\0')
return (0);
- vector_str_init(&local_name);
+ if (!vector_str_init(&local_name))
+ return (0);
ddata->cur_output = &local_name;
if (!cpp_demangle_read_encoding(ddata)) {
@@ -3953,7 +3954,7 @@ vector_type_qualifier_init(struct vector_type_qualifie
assert(v->q_container != NULL);
- if (vector_str_init(&v->ext_name) == false) {
+ if (!vector_str_init(&v->ext_name)) {
free(v->q_container);
return (0);
}
More information about the svn-src-all
mailing list