Skip to content

Commit

Permalink
Fix for C90
Browse files Browse the repository at this point in the history
  • Loading branch information
engboris committed Apr 24, 2024
1 parent 92482b0 commit c1a8cd3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libcob/strings.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,12 +473,12 @@ inspect_common (
static COB_INLINE COB_A_INLINE void
cob_inspect_init_common_mt (struct cob_inspect_state **pst, cob_field *var)
{
struct cob_inspect_state *st;
if (*pst == NULL) {
*pst = malloc (sizeof(struct cob_inspect_state));
(*pst)->mark = NULL;
(*pst)->repdata = NULL;
}
struct cob_inspect_state *st;
st = *pst;

if (COB_FIELD_HAVE_SIGN (var) && !COB_FIELD_SIGN_SEPARATE(var)) {
Expand All @@ -503,8 +503,8 @@ cob_inspect_init_common_mt (struct cob_inspect_state **pst, cob_field *var)
void
cob_inspect_init_mt (struct cob_inspect_state **pst, cob_field *var, const cob_u32_t replacing)
{
cob_inspect_init_common_mt (pst, var);
struct cob_inspect_state *st;
cob_inspect_init_common_mt (pst, var);
st = *pst;
st->replacing = replacing;

Expand Down Expand Up @@ -545,8 +545,8 @@ cob_inspect_init (cob_field *var, const cob_u32_t replacing)
void
cob_inspect_init_converting_mt (struct cob_inspect_state **pst, cob_field *var)
{
cob_inspect_init_common_mt (pst, var);
struct cob_inspect_state *st;
cob_inspect_init_common_mt (pst, var);
st = *pst;
st->replacing = 0; /* only set for pre 3.2 compat because of cob_inspect_finish */
}
Expand Down Expand Up @@ -899,9 +899,9 @@ cob_inspect_finish (void)
void
cob_string_init_mt (struct cob_string_state **pst, cob_field *dst, cob_field *ptr)
{
struct cob_string_state *st;
if (*pst == NULL)
*pst = malloc (sizeof(struct cob_string_state));
struct cob_string_state *st;
st = *pst;

st->dst_copy = *dst;
Expand Down Expand Up @@ -1019,11 +1019,11 @@ cob_unstring_init_mt (
const size_t num_dlm
)
{
struct cob_unstring_state *st;
if (*pst == NULL) {
*pst = malloc (sizeof(struct cob_unstring_state));
(*pst)->dlm_list = NULL;
}
struct cob_unstring_state *st;
st = *pst;

st->src_copy = *src;
Expand Down

0 comments on commit c1a8cd3

Please sign in to comment.