Print this page
10075 make usr/src/tools smatch clean
*** 21,30 ****
--- 21,34 ----
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+ /*
* This file is a sewer.
*/
#include <limits.h>
#include <stdarg.h>
*** 627,647 ****
if (ntdp == NULL) { /* if that type isn't defined yet */
if (*cp != '=') {
/* record it as unresolved */
parse_debug(3, NULL, "tdefdecl unres type %d",
h2);
! *rtdp = calloc(sizeof (**rtdp), 1);
(*rtdp)->t_type = TYPEDEF_UNRES;
(*rtdp)->t_id = h2;
break;
} else
cp++;
/* define a new type */
cp = tdefdecl(cp, h2, rtdp);
if ((*rtdp)->t_id && (*rtdp)->t_id != h2) {
! ntdp = calloc(sizeof (*ntdp), 1);
ntdp->t_type = TYPEDEF;
ntdp->t_tdesc = *rtdp;
*rtdp = ntdp;
}
--- 631,651 ----
if (ntdp == NULL) { /* if that type isn't defined yet */
if (*cp != '=') {
/* record it as unresolved */
parse_debug(3, NULL, "tdefdecl unres type %d",
h2);
! *rtdp = calloc(1, sizeof (**rtdp));
(*rtdp)->t_type = TYPEDEF_UNRES;
(*rtdp)->t_id = h2;
break;
} else
cp++;
/* define a new type */
cp = tdefdecl(cp, h2, rtdp);
if ((*rtdp)->t_id && (*rtdp)->t_id != h2) {
! ntdp = calloc(1, sizeof (*ntdp));
ntdp->t_type = TYPEDEF;
ntdp->t_tdesc = *rtdp;
*rtdp = ntdp;
}