diff mbox series

[3/3] ctf-reader: Use ABG_ASSERT instead of assert

Message ID 20211118232330.16310-4-guillermo.e.martinez@oracle.com
State New
Headers show
Series Some improvements in ctf-reader. | expand

Commit Message

Guillermo E. Martinez Nov. 18, 2021, 11:23 p.m. UTC
* tools/abidiff.cc (main): Use ABG_ASSERT instead of assert.
	* tools/abilint.cc: Likewise.

Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
---
 tools/abidiff.cc | 10 ++++------
 tools/abilint.cc |  5 ++---
 2 files changed, 6 insertions(+), 9 deletions(-)

Comments

Dodji Seketeli Nov. 23, 2021, 2:51 p.m. UTC | #1
"Guillermo E. Martinez via Libabigail" <libabigail@sourceware.org> a
écrit:

> 	* tools/abidiff.cc (main): Use ABG_ASSERT instead of assert.
> 	* tools/abilint.cc: Likewise.
>
> Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>

Applied to master.  Thanks!

[...]

Cheers,
diff mbox series

Patch

diff --git a/tools/abidiff.cc b/tools/abidiff.cc
index 30959616..779fa18b 100644
--- a/tools/abidiff.cc
+++ b/tools/abidiff.cc
@@ -1172,8 +1172,7 @@  main(int argc, char* argv[])
                 abigail::ctf_reader::read_context_sptr ctxt
                   = abigail::ctf_reader::create_read_context(opts.file1,
                                                              env.get());
-
-                assert (ctxt);
+                ABG_ASSERT(ctxt);
                 c1 = abigail::ctf_reader::read_corpus(ctxt.get(),
                                                       c1_status);
               }
@@ -1256,10 +1255,9 @@  main(int argc, char* argv[])
                 abigail::ctf_reader::read_context_sptr ctxt
                   = abigail::ctf_reader::create_read_context(opts.file2,
                                                              env.get());
-
-                assert (ctxt);
-                c2 = abigail::ctf_reader::read_corpus (ctxt.get(),
-                                                       c2_status);
+                ABG_ASSERT(ctxt);
+                c2 = abigail::ctf_reader::read_corpus(ctxt.get(),
+                                                      c2_status);
               }
             else
 #endif
diff --git a/tools/abilint.cc b/tools/abilint.cc
index 2e9bae49..efddd77b 100644
--- a/tools/abilint.cc
+++ b/tools/abilint.cc
@@ -373,9 +373,8 @@  main(int argc, char* argv[])
                 abigail::ctf_reader::read_context_sptr ctxt
                   = abigail::ctf_reader::create_read_context(opts.file_path,
                                                              env.get());
-
-                assert (ctxt);
-                corp = abigail::ctf_reader::read_corpus (ctxt.get(), s);
+                ABG_ASSERT(ctxt);
+                corp = abigail::ctf_reader::read_corpus(ctxt.get(), s);
               }
             else
 #endif