Skip to content

Commit

Permalink
changing fill value handling in write_darray
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed May 9, 2018
1 parent 85e008b commit 6d2fda3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/clib/pio_darray.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,17 @@ pio_inq_var_fill_expected(int ncid, int varid, int pio_type, PIO_Offset type_siz
ncid, varid, pio_type, type_size));

/* Is there a _FillValue attribute? */
ret = PIOc_get_att(ncid, varid, "_FillValue", fillvalue);
ret = PIOc_inq_att(ncid, varid, "_FillValue", NULL, NULL);

LOG((3, "pio_inq_var_fill_expected ret %d", ret));

/* If no _FillValue at was found we still have work to do. */
if (ret)
/* If there is a fill value, get it. */
if (!ret)
{
if ((ret = PIOc_get_att(ncid, varid, "_FillValue", fillvalue)))
return ret;
}
else /* If no _FillValue at was found we still have work to do. */
{
/* Did we get some other error? */
if (ret != PIO_ENOTATT)
Expand Down

0 comments on commit 6d2fda3

Please sign in to comment.