Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/common/ctf fix test.



details:   https://anonhg.NetBSD.org/src/rev/cfd218d7ac9b
branches:  trunk
changeset: 344645:cfd218d7ac9b
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 09 17:58:46 2016 +0000

description:
fix test.

diffstat:

 external/cddl/osnet/dist/common/ctf/ctf_create.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 1544e91b8c3a -r cfd218d7ac9b external/cddl/osnet/dist/common/ctf/ctf_create.c
--- a/external/cddl/osnet/dist/common/ctf/ctf_create.c  Sat Apr 09 17:51:50 2016 +0000
+++ b/external/cddl/osnet/dist/common/ctf/ctf_create.c  Sat Apr 09 17:58:46 2016 +0000
@@ -616,9 +616,11 @@
        if (!(fp->ctf_flags & LCTF_RDWR))
                return (ctf_set_errno(fp, ECTF_RDONLY));
 
-       if (!CTF_TYPE_ISCHILD(fp->ctf_dtnextid) ||
-           CTF_INDEX_TO_TYPE(fp->ctf_dtnextid, 1) > CTF_MAX_TYPE)
+       if (CTF_TYPE_ISCHILD(fp->ctf_dtnextid) ||
+           CTF_INDEX_TO_TYPE(fp->ctf_dtnextid, 1) > CTF_MAX_TYPE) {
+               ctf_dprintf("type id overflow %lu\n", fp->ctf_dtnextid);
                return (ctf_set_errno(fp, ECTF_FULL));
+       }
 
        if ((dtd = ctf_alloc(sizeof (ctf_dtdef_t))) == NULL)
                return (ctf_set_errno(fp, EAGAIN));



Home | Main Index | Thread Index | Old Index