Commit 2ddd17f7 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Cleanup binary OR assignments for clarity.

parent e5f8153c
......@@ -121,11 +121,12 @@ int cdfOpenFile(const char *filename, const char *mode, int *filetype)
break;
case 'w':
#if defined (NC_64BIT_OFFSET)
if ( *filetype == FILETYPE_NC2 ) writemode = NC_CLOBBER | NC_64BIT_OFFSET;
if ( *filetype == FILETYPE_NC2 ) writemode |= NC_64BIT_OFFSET;
#endif
#if defined (HAVE_NETCDF4)
if ( *filetype == FILETYPE_NC4 ) writemode = NC_CLOBBER | NC_NETCDF4;
else if ( *filetype == FILETYPE_NC4C ) writemode = NC_CLOBBER | NC_NETCDF4 | NC_CLASSIC_MODEL;
if ( *filetype == FILETYPE_NC4 ) writemode |= NC_NETCDF4;
else if ( *filetype == FILETYPE_NC4C )
writemode |= NC_NETCDF4 | NC_CLASSIC_MODEL;
#endif
cdf_create(filename, writemode, &ncid);
cdfComment(ncid);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment