diff --git a/cf b/cf index 3fc0ef64d..49aa6f607 100644 --- a/cf +++ b/cf @@ -2,7 +2,7 @@ #NB=1 DB=1 #X=-x -FAST=1 +#FAST=1 #PROF=1 HDF5=1 @@ -10,7 +10,7 @@ DAP=1 #SZIP=1 #HDF4=1 #PNETCDF=1 -PAR4=1 +#PAR4=1 if test $# != 0 ; then cmds=$@ diff --git a/libdispatch/nchashmap.c b/libdispatch/nchashmap.c index 5082d52f6..b098d1a45 100644 --- a/libdispatch/nchashmap.c +++ b/libdispatch/nchashmap.c @@ -2072,22 +2072,6 @@ next: continue; fflush(stderr); } - -/* Handle the data key part */ -static const char* -keystr(NC_hentry* e) -{ - static char s[sizeof(uintptr_t)+1]; - size_t x = sizeof(uintptr_t); - if(e == NULL) return ""; - if(e->keysize <= x) { - memset(s,0,sizeof(s)); - memcpy(s,(const char*)(&e->key),e->keysize); - return s; - } else - return (e->key?(const char*)(e->key):""); -} - void printhashmap(NC_hashmap* hm) { @@ -2105,8 +2089,8 @@ printhashmap(NC_hashmap* hm) for(i=0;ialloc;i++) { NC_hentry e = hm->table[i]; if(e.flags == ACTIVE) { - fprintf(stderr,"[%ld] flags=ACTIVE hashkey=%lu data=%p keysize=%u key=|%s|\n", - (unsigned long)i,(unsigned long)e.hashkey,(void*)e.data,(unsigned)e.keysize,e.key); + fprintf(stderr,"[%ld] flags=ACTIVE hashkey=%lu data=%p keysize=%u key=(%llu)|%s|\n", + (unsigned long)i,(unsigned long)e.hashkey,(void*)e.data,(unsigned)e.keysize,(unsigned long long)e.key,e.key); running = 0; } else if(e.flags == DELETED) { fprintf(stderr,"[%ld] flags=DELETED hashkey=%lu\n", diff --git a/libsrc4/nc4attr.c b/libsrc4/nc4attr.c index bf83eccfe..fd515e2ef 100644 --- a/libsrc4/nc4attr.c +++ b/libsrc4/nc4attr.c @@ -738,8 +738,6 @@ NC4_put_att(int ncid, int varid, const char *name, nc_type file_type, LOG((3, "adding attribute %s to the list...", norm_name)); if ((ret = nc4_att_list_add(attlist, norm_name, &att))) BAIL (ret); - if (!(att->hdr.name = strdup(norm_name))) - return NC_ENOMEM; } /* Now fill in the metadata. */ diff --git a/libsrc4/nc4var.c b/libsrc4/nc4var.c index e443c019b..684445860 100644 --- a/libsrc4/nc4var.c +++ b/libsrc4/nc4var.c @@ -507,9 +507,11 @@ NC4_def_var(int ncid, const char *name, nc_type xtype, { size_t len; char name[NC_MAX_NAME+1]; + char* atomname = nc4_atomic_name[xtype]; + size_t namelen = strlen(atomname); + memcpy(name,atomname,namelen); + name[namelen] = '\0'; nc4_get_typelen_mem(h5,xtype,&len); - memcpy(name,nc4_atomic_name[xtype],NC_MAX_NAME); - name[NC_MAX_NAME] = '\0'; if((retval = nc4_type_new(grp,len,name,xtype,&type_info))) BAIL(retval); type_info->endianness = NC_ENDIAN_NATIVE; diff --git a/libsrc4/ncindex.c b/libsrc4/ncindex.c index cea20bcf9..54f27be42 100644 --- a/libsrc4/ncindex.c +++ b/libsrc4/ncindex.c @@ -195,6 +195,7 @@ ncindexrebuild(NCindex* index) return 0; } #endif + if(contents != NULL) free(contents); return 1; }