Changeset 6030:9dc3e59a3ac5 in roaraudio


Ignore:
Timestamp:
07/15/14 11:16:33 (10 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

yet another error handling improvement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio_dstr.c

    r5961 r6030  
    233233 } 
    234234 
     235 roar_err_set(ROAR_ERROR_NOENT); 
    235236 return -1; 
    236237} 
     
    244245 } 
    245246 
     247 roar_err_set(ROAR_ERROR_NOENT); 
    246248 return NULL; 
    247249} 
     
    256258  return "<<EOL>>"; 
    257259 
     260 roar_err_set(ROAR_ERROR_NOENT); 
    258261 return NULL; 
    259262} 
     
    435438} 
    436439 
    437 #define _ret(x) do { int _err = roar_error; roar_mm_free(dstr_copy); roar_error = _err; roar_err_to_errno(); return (x); } while (0) 
     440#define _ret(x) do { roar_mm_free_noerror(dstr_copy); roar_err_to_errno(); return (x); } while (0) 
    438441 
    439442int     roar_vio_open_dstr_vio(struct roar_vio_calls * calls, 
     
    568571 int tmp[8]; 
    569572 
    570  if ( chain == NULL ) 
    571   return -1; 
     573 if ( chain == NULL ) { 
     574  roar_err_set(ROAR_ERROR_FAULT); 
     575  return -1; 
     576 } 
    572577 
    573578 if ( def == NULL && dnum != 0 ) 
     
    839844 ROAR_DBG("roar_vio_dstr_build_chain(*) = ?"); 
    840845 
    841  if ( chain == NULL || calls == NULL ) 
    842   return -1; 
     846 if ( chain == NULL || calls == NULL ) { 
     847  roar_err_set(ROAR_ERROR_FAULT); 
     848  return -1; 
     849 } 
    843850 
    844851 if ( roar_vio_open_stack2(calls, NULL) == -1 ) 
Note: See TracChangeset for help on using the changeset viewer.