X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libctf%2Fctf-labels.c;h=53fbdb2dfe0484ba8a736ea33eba9bbeebf0a16a;hb=d835a58baae720abe909795cb68763040d1750a8;hp=9b9fffea4ed351ae8223358406f7afa29ac7dca9;hpb=6dbf2b734063522b4f3d7403ce7a2b436802b839;p=deliverable%2Fbinutils-gdb.git diff --git a/libctf/ctf-labels.c b/libctf/ctf-labels.c index 9b9fffea4e..53fbdb2dfe 100644 --- a/libctf/ctf-labels.c +++ b/libctf/ctf-labels.c @@ -1,5 +1,5 @@ /* Labelled ranges of type IDs. - Copyright (C) 2019 Free Software Foundation, Inc. + Copyright (C) 2019-2020 Free Software Foundation, Inc. This file is part of libctf. @@ -43,7 +43,7 @@ ctf_label_topmost (ctf_file_t *fp) const char *s; uint32_t num_labels = 0; - if (extract_label_info (fp, &ctlp, &num_labels) == CTF_ERR) + if (extract_label_info (fp, &ctlp, &num_labels) < 0) return NULL; /* errno is set for us. */ if (num_labels == 0) @@ -70,8 +70,8 @@ ctf_label_iter (ctf_file_t *fp, ctf_label_f *func, void *arg) const char *lname; int rc; - if (extract_label_info (fp, &ctlp, &num_labels) == CTF_ERR) - return CTF_ERR; /* errno is set for us. */ + if (extract_label_info (fp, &ctlp, &num_labels) < 0) + return -1; /* errno is set for us. */ if (num_labels == 0) return (ctf_set_errno (fp, ECTF_NOLABELDATA)); @@ -128,7 +128,7 @@ ctf_label_info (ctf_file_t *fp, const char *lname, ctf_lblinfo_t *linfo) cb_arg.lca_name = lname; cb_arg.lca_info = linfo; - if ((rc = ctf_label_iter (fp, label_info_cb, &cb_arg)) == CTF_ERR) + if ((rc = ctf_label_iter (fp, label_info_cb, &cb_arg)) < 0) return rc; if (rc != 1)