From 5fa67ebe165a9a25c05e2be05a364de1c6eae6e4 Mon Sep 17 00:00:00 2001 From: edwardhartnett Date: Thu, 1 Aug 2019 11:31:03 -0600 Subject: [PATCH] removed need of NC pointer in create for pnetcdf dispatch layer --- libsrcp/ncpdispatch.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libsrcp/ncpdispatch.c b/libsrcp/ncpdispatch.c index 6ad285628..f586c3481 100644 --- a/libsrcp/ncpdispatch.c +++ b/libsrcp/ncpdispatch.c @@ -87,10 +87,15 @@ NCP_open(const char *path, size_t *chunksizehintp, void *mpidata, const struct NC_Dispatch *table, - NC *nc) + NC *nc1) { int status; NCP_INFO *nc5; + NC *nc; + + /* Find pointer to NC for this file. */ + status = NC_check_id(nc1->ext_ncid, &nc); + if (status != NC_NOERR) return status; /* Check the omode for only valid flags */ if (omode & ~LEGAL_OPEN_FLAGS) return NC_EINVAL;