diff options
author | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2001-10-30 13:58:04 +0000 |
---|---|---|
committer | tradke <tradke@b589c3ab-70e8-4b4d-a09f-cba2dd200880> | 2001-10-30 13:58:04 +0000 |
commit | 99faa32c501ebb610aa7d40e55b714272bb785d8 (patch) | |
tree | 1cf4fbf03097613b128f2f51a5e66ce08ba02210 /src | |
parent | 5875cdece6520fa614cad4ba6ca45d59003be6f2 (diff) |
Fixed const pointer issue in the advertised file structure.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOBasic/trunk@104 b589c3ab-70e8-4b4d-a09f-cba2dd200880
Diffstat (limited to 'src')
-rw-r--r-- | src/WriteScalar.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/WriteScalar.c b/src/WriteScalar.c index 8528bb8..981f30e 100644 --- a/src/WriteScalar.c +++ b/src/WriteScalar.c @@ -334,13 +334,16 @@ static FILE *OpenScalarFile (cGH *GH, char comment_char, buffer[128]; ioAdvertisedFileDesc advertised_file; iobasicGH *myGH; - char *openmode; + char *openmode, *fullname; struct stat fileinfo; /* get the GH extension handle for IOBasic */ myGH = (iobasicGH *) CCTK_GHExtension (GH, "IOBasic"); + /* get the variable's full name */ + fullname = CCTK_FullName (vindex); + /* see if output files for this alias name were already created */ if (GetNamedData (myGH->filenameListScalar, filename) == NULL) { @@ -375,10 +378,10 @@ static FILE *OpenScalarFile (cGH *GH, StoreNamedData (&myGH->filenameListScalar, filename, (void *) 1); /* advertise the file for downloading */ - advertised_file.slice = strdup (slicename); + advertised_file.slice = slicename; advertised_file.thorn = CCTK_THORNSTRING; - advertised_file.varname = CCTK_FullName (vindex); - advertised_file.description = strdup (description); + advertised_file.varname = fullname; + advertised_file.description = description; IOUtil_AdvertiseFile (GH, filename, &advertised_file); @@ -407,9 +410,7 @@ static FILE *OpenScalarFile (cGH *GH, } fprintf (file, "%c%s v time\n", comment_char, aliasname); - free (advertised_file.description); - free (advertised_file.varname); - free (advertised_file.slice); + free (fullname); } return (file); |