Changeset 53ed3a0 in tol


Ignore:
Timestamp:
Feb 22, 2009, 12:25:26 AM (18 years ago)
Author:
Jorge Pérez <josp.jorge@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
087fc07
Parents:
3e2cc31
Message:

cheking if FILE* is valid before using it.

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@628 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/btol/vmatrix_type/vmat_io.cpp

    r3e2cc31 r53ed3a0  
    193193        I2("virtual matrix","")+" "+CodeName(a.code_)+
    194194           "("+a.Rows()+"x"+a.Columns()+")"+" ");
     195#if defined( WIN32 )
     196  FILE *f = fopen("c:\\fail_chol.mtx", "w");
     197#else
    195198  FILE *f = fopen("/tmp/fail_chol.mtx", "w");
    196   ((BVMat&)a).WriteMatrixMarket(f);
    197   fclose(f);
     199#endif
     200  if ( f ) {
     201    ((BVMat&)a).WriteMatrixMarket(f);
     202    fclose(f);
     203  }
    198204}
    199205
Note: See TracChangeset for help on using the changeset viewer.