@@ -93,7 +93,7 @@ fill_var_buf(const NC_var *varp,
9393{
9494 int i , indx ;
9595
96- indx = ncmpio_NC_findattr (& varp -> attrs , _FillValue );
96+ indx = ncmpio_NC_findattr (& varp -> attrs , " _FillValue" );
9797 if (indx >= 0 ) {
9898 /* User defined fill value */
9999 NC_attr * attrp = varp -> attrs .value [indx ];
@@ -280,12 +280,12 @@ fillerup(NC *ncp)
280280 * explicitly filled by calling ncmpi_fill_var_rec() */
281281 continue ;
282282
283- /* check if _FillValue attribute is defined */
284- indx = ncmpio_NC_findattr (& ncp -> vars .value [i ]-> attrs , _FillValue );
283+ /* check if attribute _FillValue is defined */
284+ indx = ncmpio_NC_findattr (& ncp -> vars .value [i ]-> attrs , " _FillValue" );
285285
286286 /* only if filling this variable is requested. Fill mode can be
287287 * enabled by 2 ways: explictly call to ncmpi_def_var_fill() or put
288- * the attribute named _FillValue */
288+ * the attribute named " _FillValue" */
289289 if (ncp -> vars .value [i ]-> no_fill && indx == -1 ) continue ;
290290
291291 /* collectively fill the entire variable */
@@ -309,8 +309,8 @@ fill_added(NC *ncp, NC *old_ncp)
309309 /* skip record variables */
310310 continue ;
311311
312- /* check if _FillValue attribute is defined */
313- indx = ncmpio_NC_findattr (& ncp -> vars .value [varid ]-> attrs , _FillValue );
312+ /* check if attribute _FillValue is defined */
313+ indx = ncmpio_NC_findattr (& ncp -> vars .value [varid ]-> attrs , " _FillValue" );
314314
315315 /* only if filling this variable is requested */
316316 if (ncp -> vars .value [varid ]-> no_fill && indx == -1 ) continue ;
@@ -338,8 +338,8 @@ fill_added_recs(NC *ncp, NC *old_ncp)
338338 /* skip non-record variables */
339339 continue ;
340340
341- /* check if _FillValue attribute is defined */
342- indx = ncmpio_NC_findattr (& ncp -> vars .value [varid ]-> attrs , _FillValue );
341+ /* check if attribute _FillValue is defined */
342+ indx = ncmpio_NC_findattr (& ncp -> vars .value [varid ]-> attrs , " _FillValue" );
343343
344344 /* only if filling this variable is requested */
345345 if (ncp -> vars .value [varid ]-> no_fill && indx == -1 ) continue ;
@@ -725,8 +725,8 @@ ncmpio_fill_var_rec(void *ncdp,
725725 goto err_check ;
726726 }
727727
728- /* check if _FillValue attribute is defined */
729- indx = ncmpio_NC_findattr (& varp -> attrs , _FillValue );
728+ /* check if attribute _FillValue is defined */
729+ indx = ncmpio_NC_findattr (& varp -> attrs , " _FillValue" );
730730
731731 /* error if the fill mode of this variable is not on */
732732 if (varp -> no_fill && indx == -1 ) {
@@ -891,7 +891,7 @@ ncmpio_def_var_fill(void *ncdp,
891891 if (fill_value != NULL && !varp -> no_fill ) {
892892
893893 /* create/overwrite attribute _FillValue */
894- err = ncmpio_put_att (ncdp , varid , _FillValue , varp -> xtype ,
894+ err = ncmpio_put_att (ncdp , varid , " _FillValue" , varp -> xtype ,
895895 1 , fill_value , ncmpii_nc2mpitype (varp -> xtype ));
896896 if (err != NC_NOERR ) return err ;
897897 }
@@ -911,9 +911,9 @@ ncmpio_inq_var_fill(NC_var *varp,
911911
912912 assert (varp != NULL ); /* NC_GLOBAL varid is illegal in this context */
913913
914- /* Check if _FillValue is defined for this variable */
914+ /* Check if attribute _FillValue is defined for this variable */
915915 for (i = 0 ; i < ncap -> ndefined ; i ++ ) {
916- if (strcmp (ncap -> value [i ]-> name , _FillValue ) == 0 )
916+ if (strcmp (ncap -> value [i ]-> name , " _FillValue" ) == 0 )
917917 break ;
918918 }
919919 if (i == ncap -> ndefined ) { /* attribute _FillValue is not set */
0 commit comments