Changeset c510a7 for pcp/src/perturbed.c


Ignore:
Timestamp:
Apr 29, 2008, 12:19:51 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
e936b3
Parents:
307fd1
Message:

char lengths of 255 and MAXDUMMYSTRING replaced with define MAXSTRINGSIZE in molecuilder and pcp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/perturbed.c

    r307fd1 rc510a7  
    29752975  }
    29762976
    2977   suffixchi = (char *) Malloc(sizeof(char)*255, "CalculateMagneticSusceptibility: *suffixchi");
     2977  suffixchi = (char *) Malloc(sizeof(char)*MAXSTRINGSIZE, "CalculateMagneticSusceptibility: *suffixchi");
    29782978  // store symmetrized matrix
    29792979  for (in=0;in<NDIM;in++)
     
    31003100  gsl_matrix_complex *H = gsl_matrix_complex_calloc(NDIM,NDIM);
    31013101  FILE *SigmaFile;
    3102   char *suffixsigma = (char *) Malloc(sizeof(char)*255, "CalculateChemicalShieldingByReciprocalCurrentDensity: *suffixsigma");
     3102  char *suffixsigma = (char *) Malloc(sizeof(char)*MAXSTRINGSIZE, "CalculateChemicalShieldingByReciprocalCurrentDensity: *suffixsigma");
    31033103 
    31043104  time_t seconds; 
     
    34003400  const int N0 = Lev0->Plan0.plan->local_nx;
    34013401  FILE *MomentFile;
    3402   char *suffixmoment = (char *) Malloc(sizeof(char)*255, "CalculateMagneticMoment: *suffixmoment");
     3402  char *suffixmoment = (char *) Malloc(sizeof(char)*MAXSTRINGSIZE, "CalculateMagneticMoment: *suffixmoment");
    34033403  time_t seconds; 
    34043404  time(&seconds); // get current time
     
    38853885  if (!myPE) { // only process 0 writes to file
    38863886    // open file
    3887     filename = (char *) Malloc(sizeof(char)*255, "PlotVectorPlane: *filename");
     3887    filename = (char *) Malloc(sizeof(char)*MAXSTRINGSIZE, "PlotVectorPlane: *filename");
    38883888    sprintf(&filename[0], ".current.L%i.csv", Lev0->LevelNo);
    38893889    OpenFile(P, &PlotFile, filename, "w", P->Call.out[ReadOut]);
Note: See TracChangeset for help on using the changeset viewer.