Skip to content

Commit

Permalink
EXODUS: clang-analyzer fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjaardema committed Jun 2, 2022
1 parent ec8bf27 commit 4c70226
Show file tree
Hide file tree
Showing 39 changed files with 186 additions and 137 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021 National Technology & Engineering Solutions
* Copyright(C) 1999-2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -346,6 +346,8 @@ int ex__put_homogenous_block_params(int exoid, size_t block_count, const struct

/* leave define mode */
if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
return (EX_FATAL);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exodus/src/ex_close.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2020 National Technology & Engineering Solutions
* Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -70,7 +70,7 @@ int ex_close(int exoid)
int parent_id = 0;
if ((status = nc_inq_grp_parent(exoid, &parent_id)) != NC_ENOGRP) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: file id %d does not refer to root group.", exoid);
ex_err_fn(exoid, __func__, errmsg, EX_NOTROOTID);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/exodus/src/ex_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ int cpy_global_att(int in_exoid, int out_exoid)
* word size, I/O word size etc. are global attributes stored when
* file is created with ex_create; we don't want to overwrite those
*/
if ((status = nc_inq_att(out_exoid, NC_GLOBAL, att.name, &att.type, &att.len)) != NC_NOERR) {
if (nc_inq_att(out_exoid, NC_GLOBAL, att.name, &att.type, &att.len) != NC_NOERR) {

/* The "last_written_time" attribute is a special attribute used
by the IOSS library to determine whether a timestep has been
Expand Down
4 changes: 3 additions & 1 deletion packages/seacas/libraries/exodus/src/ex_create_group.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2020 National Technology & Engineering Solutions
* Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -40,6 +40,8 @@ int ex_create_group(int parent_id, const char *group_name)
}

if ((status = ex__leavedef(parent_id, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode");
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}
EX_FUNC_LEAVE(exoid);
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exodus/src/ex_get_cmap_params.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021 National Technology & Engineering Solutions
* Copyright(C) 1999-2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -228,7 +228,7 @@ int ex_get_cmap_params(int exoid, void_int *node_cmap_ids, void_int *node_cmap_n
}

/* Get the number of elemental communications maps in the file */
if ((status = nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid)) == NC_NOERR) {
if (nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid) == NC_NOERR) {
/* check if I need to get the dimension of the nodal comm map */
if (cmap_info_idx[1] == -1) {
if ((status = nc_inq_dimlen(exoid, dimid, count)) != NC_NOERR) {
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exodus/src/ex_get_init_info.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2020 National Technology & Engineering Solutions
* Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -55,7 +55,7 @@ int ex_get_init_info(int exoid, int *num_proc, int *num_proc_in_f, char *ftype)
EX_FUNC_LEAVE(EX_FATAL);
}

if ((status = nc_inq_dimid(exoid, DIM_NUM_PROCS, &dimid)) != NC_NOERR) {
if (nc_inq_dimid(exoid, DIM_NUM_PROCS, &dimid) != NC_NOERR) {
/* This isn't a parallel file. Just return now with no error, but with num_proc and
* num_proc_in_f set to 1 */
EX_FUNC_LEAVE(EX_NOERR);
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exodus/src/ex_get_loadbal_param.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2020 National Technology & Engineering Solutions
* Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -479,7 +479,7 @@ int ex_get_loadbal_param(int exoid, void_int *num_int_nodes, void_int *num_bor_n
/* check if I need to get the dimension of the elemental comm map */
if (varidx[1] == -1) {
/* Get the elemental comm map information */
if ((status = nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid)) != NC_NOERR) {
if (nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid) != NC_NOERR) {
varidx[1] = 0;
}
else {
Expand Down
4 changes: 2 additions & 2 deletions packages/seacas/libraries/exodus/src/ex_get_map.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021 National Technology & Engineering Solutions
* Copyright(C) 1999-2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -54,7 +54,7 @@ int ex_get_map(int exoid, void_int *elem_map)

/* See if file contains any elements...*/
int numelemdim;
if ((status = nc_inq_dimid(exoid, DIM_NUM_ELEM, &numelemdim)) != NC_NOERR) {
if (nc_inq_dimid(exoid, DIM_NUM_ELEM, &numelemdim) != NC_NOERR) {
EX_FUNC_LEAVE(EX_NOERR);
}

Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/libraries/exodus/src/ex_inquire.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021 National Technology & Engineering Solutions
* Copyright(C) 1999-2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -221,7 +221,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float
It will not include the space for the trailing null, so if it
is defined as 33 on the database, 32 will be returned.
*/
if ((status = nc_inq_dimid(rootid, DIM_STR_NAME, &dimid)) != NC_NOERR) {
if (nc_inq_dimid(rootid, DIM_STR_NAME, &dimid) != NC_NOERR) {
/* If not found, then an older database */
*ret_int = 32;
}
Expand Down Expand Up @@ -497,7 +497,7 @@ static int ex_inquire_internal(int exoid, int req_info, int64_t *ret_int, float
return (EX_FATAL);
}
/* get variable id of status array */
if ((status = nc_inq_varid(exoid, VAR_SS_STAT, &varid)) == NC_NOERR) {
if (nc_inq_varid(exoid, VAR_SS_STAT, &varid) == NC_NOERR) {
/* if status array exists, use it, otherwise assume, object exists
to be backward compatible */

Expand Down
4 changes: 3 additions & 1 deletion packages/seacas/libraries/exodus/src/ex_open.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021 National Technology & Engineering Solutions
* Copyright(C) 1999-2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -316,6 +316,8 @@ int ex_open_int(const char *path, int mode, int *comp_ws, int *io_ws, float *ver
}
}
if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}
}
Expand Down
63 changes: 29 additions & 34 deletions packages/seacas/libraries/exodus/src/ex_put_all_var_param_ext.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021 National Technology & Engineering Solutions
* Copyright(C) 1999-2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -115,7 +115,7 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp)
goto error_ret;
}

if ((status = nc_inq_dimid(exoid, DIM_NUM_NODES, &num_nod_dim)) != NC_NOERR) {
if (nc_inq_dimid(exoid, DIM_NUM_NODES, &num_nod_dim) != NC_NOERR) {
num_nod_dim = -1; /* There is probably no nodes on this file */
}

Expand Down Expand Up @@ -200,66 +200,61 @@ int ex_put_all_var_param_ext(int exoid, const ex_var_params *vp)
}
}

if ((status =
ex_define_vars(exoid, EX_EDGE_BLOCK, "edge", "edge block", vp->num_edge, DIM_NUM_EDG_VAR,
numedblkdim, numedvardim, num_edge_blk, &edblk_ids, VAR_NAME_EDG_VAR,
VAR_EBLK_TAB, &edblk_stat, vp->edge_var_tab, &edblk_varid)) != EX_NOERR) {
if (ex_define_vars(exoid, EX_EDGE_BLOCK, "edge", "edge block", vp->num_edge, DIM_NUM_EDG_VAR,
numedblkdim, numedvardim, num_edge_blk, &edblk_ids, VAR_NAME_EDG_VAR,
VAR_EBLK_TAB, &edblk_stat, vp->edge_var_tab, &edblk_varid) != EX_NOERR) {
goto error_ret;
}

if ((status =
ex_define_vars(exoid, EX_FACE_BLOCK, "face", "face block", vp->num_face, DIM_NUM_FAC_VAR,
numfablkdim, numfavardim, num_face_blk, &fablk_ids, VAR_NAME_FAC_VAR,
VAR_FBLK_TAB, &fablk_stat, vp->face_var_tab, &fablk_varid)) != EX_NOERR) {
if (ex_define_vars(exoid, EX_FACE_BLOCK, "face", "face block", vp->num_face, DIM_NUM_FAC_VAR,
numfablkdim, numfavardim, num_face_blk, &fablk_ids, VAR_NAME_FAC_VAR,
VAR_FBLK_TAB, &fablk_stat, vp->face_var_tab, &fablk_varid) != EX_NOERR) {
goto error_ret;
}

if ((status = ex_define_vars(exoid, EX_ELEM_BLOCK, "element", "element block", vp->num_elem,
DIM_NUM_ELE_VAR, numelblkdim, numelvardim, num_elem_blk, &eblk_ids,
VAR_NAME_ELE_VAR, VAR_ELEM_TAB, &eblk_stat, vp->elem_var_tab,
&eblk_varid)) != EX_NOERR) {
if (ex_define_vars(exoid, EX_ELEM_BLOCK, "element", "element block", vp->num_elem,
DIM_NUM_ELE_VAR, numelblkdim, numelvardim, num_elem_blk, &eblk_ids,
VAR_NAME_ELE_VAR, VAR_ELEM_TAB, &eblk_stat, vp->elem_var_tab,
&eblk_varid) != EX_NOERR) {
goto error_ret;
}

if ((status =
ex_define_vars(exoid, EX_NODE_SET, "nodeset", "node set", vp->num_nset, DIM_NUM_NSET_VAR,
numnsetdim, nsetvardim, num_nset, &nset_ids, VAR_NAME_NSET_VAR,
VAR_NSET_TAB, &nset_stat, vp->nset_var_tab, &nset_varid)) != EX_NOERR) {
if (ex_define_vars(exoid, EX_NODE_SET, "nodeset", "node set", vp->num_nset, DIM_NUM_NSET_VAR,
numnsetdim, nsetvardim, num_nset, &nset_ids, VAR_NAME_NSET_VAR, VAR_NSET_TAB,
&nset_stat, vp->nset_var_tab, &nset_varid) != EX_NOERR) {
goto error_ret;
}

if ((status =
ex_define_vars(exoid, EX_EDGE_SET, "edgeset", "edge set", vp->num_eset, DIM_NUM_ESET_VAR,
numesetdim, esetvardim, num_eset, &eset_ids, VAR_NAME_ESET_VAR,
VAR_ESET_TAB, &eset_stat, vp->eset_var_tab, &eset_varid)) != EX_NOERR) {
if (ex_define_vars(exoid, EX_EDGE_SET, "edgeset", "edge set", vp->num_eset, DIM_NUM_ESET_VAR,
numesetdim, esetvardim, num_eset, &eset_ids, VAR_NAME_ESET_VAR, VAR_ESET_TAB,
&eset_stat, vp->eset_var_tab, &eset_varid) != EX_NOERR) {
goto error_ret;
}

if ((status =
ex_define_vars(exoid, EX_FACE_SET, "faceset", "face set", vp->num_fset, DIM_NUM_FSET_VAR,
numfsetdim, fsetvardim, num_fset, &fset_ids, VAR_NAME_FSET_VAR,
VAR_FSET_TAB, &fset_stat, vp->fset_var_tab, &fset_varid)) != EX_NOERR) {
if (ex_define_vars(exoid, EX_FACE_SET, "faceset", "face set", vp->num_fset, DIM_NUM_FSET_VAR,
numfsetdim, fsetvardim, num_fset, &fset_ids, VAR_NAME_FSET_VAR, VAR_FSET_TAB,
&fset_stat, vp->fset_var_tab, &fset_varid) != EX_NOERR) {
goto error_ret;
}

if ((status =
ex_define_vars(exoid, EX_SIDE_SET, "sideset", "side set", vp->num_sset, DIM_NUM_SSET_VAR,
numssetdim, ssetvardim, num_sset, &sset_ids, VAR_NAME_SSET_VAR,
VAR_SSET_TAB, &sset_stat, vp->sset_var_tab, &sset_varid)) != EX_NOERR) {
if (ex_define_vars(exoid, EX_SIDE_SET, "sideset", "side set", vp->num_sset, DIM_NUM_SSET_VAR,
numssetdim, ssetvardim, num_sset, &sset_ids, VAR_NAME_SSET_VAR, VAR_SSET_TAB,
&sset_stat, vp->sset_var_tab, &sset_varid) != EX_NOERR) {
goto error_ret;
}

if ((status = ex_define_vars(exoid, EX_ELEM_SET, "elemset", "element set", vp->num_elset,
DIM_NUM_ELSET_VAR, numelsetdim, elsetvardim, num_elset, &elset_ids,
VAR_NAME_ELSET_VAR, VAR_ELSET_TAB, &elset_stat, vp->elset_var_tab,
&elset_varid)) != EX_NOERR) {
if (ex_define_vars(exoid, EX_ELEM_SET, "elemset", "element set", vp->num_elset, DIM_NUM_ELSET_VAR,
numelsetdim, elsetvardim, num_elset, &elset_ids, VAR_NAME_ELSET_VAR,
VAR_ELSET_TAB, &elset_stat, vp->elset_var_tab, &elset_varid) != EX_NOERR) {
goto error_ret;
}

/* leave define mode */

in_define = 0;
if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode");
ex_err_fn(exoid, __func__, errmsg, status);
goto error_ret;
}

Expand Down
4 changes: 3 additions & 1 deletion packages/seacas/libraries/exodus/src/ex_put_assemblies.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2020 National Technology & Engineering Solutions
* Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -167,6 +167,8 @@ int ex_put_assemblies(int exoid, size_t count, const struct ex_assembly *assembl
/* leave define mode */
if (in_define) {
if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
free(entlst_id);
EX_FUNC_LEAVE(EX_FATAL);
}
Expand Down
8 changes: 7 additions & 1 deletion packages/seacas/libraries/exodus/src/ex_put_attribute.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021 National Technology & Engineering Solutions
* Copyright(C) 1999-2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -55,6 +55,8 @@ int ex_put_double_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id,

/* leave define mode */
if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode");
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}

Expand Down Expand Up @@ -105,6 +107,8 @@ int ex_put_integer_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id

/* leave define mode */
if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode");
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}

Expand Down Expand Up @@ -149,6 +153,8 @@ int ex_put_text_attribute(int exoid, ex_entity_type obj_type, ex_entity_id id, c

/* leave define mode */
if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode");
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}

Expand Down
4 changes: 3 additions & 1 deletion packages/seacas/libraries/exodus/src/ex_put_blobs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2020 National Technology & Engineering Solutions
* Copyright(C) 1999-2020, 2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -118,6 +118,8 @@ int ex_put_blobs(int exoid, size_t count, const struct ex_blob *blobs)
}
/* leave define mode */
if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode in file id %d", exoid);
ex_err_fn(exoid, __func__, errmsg, status);
free(entlst_id);
EX_FUNC_LEAVE(EX_FATAL);
}
Expand Down
8 changes: 5 additions & 3 deletions packages/seacas/libraries/exodus/src/ex_put_block_params.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021 National Technology & Engineering Solutions
* Copyright(C) 1999-2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -119,7 +119,7 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl
__func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: No %ss defined in file id %d",
ex_name_of_object(last_type), exoid);
ex_err_fn(exoid, __func__, errmsg, EX_LASTERR);
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}

Expand Down Expand Up @@ -169,7 +169,7 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl
&dimid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: No %ss defined in file id %d",
ex_name_of_object(blocks[i].type), exoid);
ex_err_fn(exoid, __func__, errmsg, EX_LASTERR);
ex_err_fn(exoid, __func__, errmsg, status);
free(blocks_to_define);
EX_FUNC_LEAVE(EX_FATAL);
}
Expand Down Expand Up @@ -565,6 +565,8 @@ int ex_put_block_params(int exoid, size_t block_count, const struct ex_block *bl

/* leave define mode */
if ((status = ex__leavedef(exoid, __func__)) != NC_NOERR) {
snprintf(errmsg, MAX_ERR_LENGTH, "ERROR: failed to exit define mode");
ex_err_fn(exoid, __func__, errmsg, status);
EX_FUNC_LEAVE(EX_FATAL);
}

Expand Down
6 changes: 3 additions & 3 deletions packages/seacas/libraries/exodus/src/ex_put_cmap_params.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(C) 1999-2021 National Technology & Engineering Solutions
* Copyright(C) 1999-2022 National Technology & Engineering Solutions
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
* NTESS, the U.S. Government retains certain rights in this software.
*
Expand Down Expand Up @@ -95,7 +95,7 @@ int ex_put_cmap_params(int exoid, const void_int *node_cmap_ids,

/* Check to see if there are nodal communications maps in the file */
size_t num_n_comm_maps;
if ((status = nc_inq_dimid(exoid, DIM_NUM_N_CMAPS, &dimid[0])) != NC_NOERR) {
if (nc_inq_dimid(exoid, DIM_NUM_N_CMAPS, &dimid[0]) != NC_NOERR) {
num_n_comm_maps = 0;
}
else {
Expand Down Expand Up @@ -178,7 +178,7 @@ int ex_put_cmap_params(int exoid, const void_int *node_cmap_ids,

/* Check to see if there are elemental communications maps in the file */
size_t num_e_comm_maps;
if ((status = nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid[0])) != NC_NOERR) {
if (nc_inq_dimid(exoid, DIM_NUM_E_CMAPS, &dimid[0]) != NC_NOERR) {
num_e_comm_maps = 0;
}
else {
Expand Down
Loading

0 comments on commit 4c70226

Please sign in to comment.