Changeset 293 for trunk/ADOL-C


Ignore:
Timestamp:
Jan 18, 2012 9:50:28 AM (8 years ago)
Author:
kulshres
Message:

Use calloc instead of new, since this memory is always free'd

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/src/sparse/sparsedrivers.cpp

    r291 r293  
    298298      if (options[2] == -1)
    299299        {
    300           (*rind) = new unsigned int[*nnz];
    301           (*cind) = new unsigned int[*nnz];
     300          (*rind) = (unsigned int*)calloc(*nnz,sizeof(unsigned int));
     301          (*cind) = (unsigned int*)calloc(*nnz,sizeof(unsigned int));
    302302          unsigned int index = 0;
    303303          for (i=0;i<depen;i++)
Note: See TracChangeset for help on using the changeset viewer.