Changeset d3482a for pcp/src/pseudo.c


Ignore:
Timestamp:
Apr 23, 2008, 4:03:13 PM (18 years ago)
Author:
Frederik Heber <heber@…>
Children:
4f9fe2
Parents:
d52fb5
Message:

various suffix...[255] or filename[255] were changed from arrays to pointers

Instead of having fixed array length that are fully represented in the code switched to Malloc/Free.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/pseudo.c

    rd52fb5 rd3482a  
    445445void InitPseudoRead(struct Problem *P, char *pseudopot_path)
    446446{
    447   char cpiInputFileName[255];
     447  char *cpiInputFileName;
    448448  FILE *cpiInputFile;
    449449  int i,it,ib,il,m,j,ia;
     
    483483  PP->lm_endmax = 0;
    484484  PP->corecorr = NotCoreCorrected;
     485  cpiInputFileName = (char *) Malloc(sizeof(char)*255, "InitPseudoRead: *cpiInputFileName");
    485486  for (it = 0; it < I->Max_Types; it++) {
    486487    PP->lm_end[it] = I->I[it].l_max*I->I[it].l_max+1-2*I->I[it].l_loc;
     
    585586    fclose(cpiInputFile);
    586587  }
     588  Free(cpiInputFileName, "InitPseudoRead: *cpiInputFileName");
    587589  PP->fnl = (fftw_complex ****) Malloc(sizeof(fftw_complex***)*(Lat->Psi.LocalNo+1), "InitPseudoRead: ");
    588590  for (i=0; i< Lat->Psi.LocalNo+1; i++) {
Note: See TracChangeset for help on using the changeset viewer.