diff options
author | Mark Johnston <markj@FreeBSD.org> | 2015-03-11 00:01:39 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2015-03-11 00:01:39 +0000 |
commit | f810bf0eaf9cae9abe64524c8706875e8fdfa0ec (patch) | |
tree | 0c0e85ef123c492fa524f9f386b0110c83929569 /cddl/contrib/opensolaris/common/ctf | |
parent | 1c229658b9d8cd364d8219489a563c0ed58e1567 (diff) | |
download | src-f810bf0eaf9cae9abe64524c8706875e8fdfa0ec.tar.gz src-f810bf0eaf9cae9abe64524c8706875e8fdfa0ec.zip |
Notes
Diffstat (limited to 'cddl/contrib/opensolaris/common/ctf')
-rw-r--r-- | cddl/contrib/opensolaris/common/ctf/ctf_create.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cddl/contrib/opensolaris/common/ctf/ctf_create.c b/cddl/contrib/opensolaris/common/ctf/ctf_create.c index 679ed18798a7..1c0988a38783 100644 --- a/cddl/contrib/opensolaris/common/ctf/ctf_create.c +++ b/cddl/contrib/opensolaris/common/ctf/ctf_create.c @@ -1313,10 +1313,13 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type) * unless dst_type is a forward declaration and src_type is a struct, * union, or enum (i.e. the definition of the previous forward decl). */ - if (dst_type != CTF_ERR && dst_kind != kind && ( - dst_kind != CTF_K_FORWARD || (kind != CTF_K_ENUM && - kind != CTF_K_STRUCT && kind != CTF_K_UNION))) - return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + if (dst_type != CTF_ERR && dst_kind != kind) { + if (dst_kind != CTF_K_FORWARD || (kind != CTF_K_ENUM && + kind != CTF_K_STRUCT && kind != CTF_K_UNION)) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + else + dst_type = CTF_ERR; + } /* * If the non-empty name was not found in the appropriate hash, search |