From ba726d55ce8f04c5f4b17042760b6e0db8388ca6 Mon Sep 17 00:00:00 2001 From: dmh Date: Mon, 3 Mar 2014 13:43:47 -0700 Subject: [PATCH] synch with oc2.0 --- libdap2/env | 2 +- oc2/Make0 | 4 ++-- oc2/ocutil.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libdap2/env b/libdap2/env index dc8073836..a70e8e8f7 100644 --- a/libdap2/env +++ b/libdap2/env @@ -6,7 +6,7 @@ alias q0=;alias qq=;alias qv=;alias q=;alias qh=;alias qqh=;alias qall=;alias q #TOP="/home/dmh/mach/netcdf-c" TOP="/cygdrive/f/git/netcdf-c" -F="http://tigge:tiggeUser@thredds-test.ucar.edu/thredds/dodsC/restrict/testData.nc" +F="http://tiggeUser:tigge@thredds-test.ucar.edu/thredds/dodsC/restrict/testData.nc" #CON='SPEED.SPEED' #VAR=SPEED diff --git a/oc2/Make0 b/oc2/Make0 index 802178446..0d82a1d2f 100755 --- a/oc2/Make0 +++ b/oc2/Make0 @@ -1,6 +1,6 @@ THISDIR=../oc2 -OCDIR=/home/dmh/svn/oc2.0 -#OCDIR=f:/svn/oc2.0 +#OCDIR=/home/dmh/svn/oc2.0 +OCDIR=f:/svn/oc2.0 # Make consistent with Makefile.am SRC=oc.c \ diff --git a/oc2/ocutil.c b/oc2/ocutil.c index ac59e2ab4..cfbcdd9f7 100644 --- a/oc2/ocutil.c +++ b/oc2/ocutil.c @@ -726,12 +726,12 @@ ocmktmp(const char* base, char** tmpnamep, int* fdp) } #endif /* !HAVE_MKSTEMP */ if(fd < 0) { - free(tmpname); + if(tmpname != NULL) free(tmpname); return OC_EOPEN; } if(tmpnamep) *tmpnamep = tmpname; - else free(tmpname); + else if(tmpname != null) {free(tmpname);} if(fdp) *fdp = fd; - else if(fd) close(fd); + else if(fd >= 0) close(fd); return OC_NOERR; }