diff --git a/libcob/strings.c b/libcob/strings.c index 838ba0a0f..4c435bc2d 100644 --- a/libcob/strings.c +++ b/libcob/strings.c @@ -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)) { @@ -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; @@ -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 */ } @@ -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; @@ -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;