Fix missing ERR after if test

A couple API invocations were missing the ERR macro following the if test.
This commit is contained in:
Greg Sjaardema 2018-01-31 09:17:28 -07:00 committed by GitHub
parent 070df7c583
commit 60a6f34102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,13 +114,13 @@ main(int argc, char **argv)
/* Create a classic model file. No groups will be allowed. */
if (nc_create(FILE_NAME_CLASSIC_MODEL, NC_NETCDF4|NC_CLASSIC_MODEL, &ncid2)) ERR;
if (nc_def_grp(ncid2, HENRY_VII, &henry_vii_id) != NC_ESTRICTNC3) ERR;
if (nc_def_var(ncid2, HENRY_IV, NC_INT, 0, NULL, NULL));
if (nc_def_var(ncid2, HENRY_IV, NC_INT, 0, NULL, NULL)) ERR;
if (nc_close(ncid2)) ERR;
/* Create a file with one group, a group to contain data about
* Henry VII. */
if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR;
if (nc_def_var(ncid, HENRY_IV, NC_INT, 0, NULL, NULL));
if (nc_def_var(ncid, HENRY_IV, NC_INT, 0, NULL, NULL)) ERR;
/* Turn off define mode. It will automatically be turned back on
* when nc_def_grp is called. */