Changeset 4963:1fea81784c37 in roaraudio


Ignore:
Timestamp:
05/14/11 05:10:40 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_vio_clear_calls()

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/vio.h

    r4708 r4963  
    6262 
    6363int roar_vio_init_calls (struct roar_vio_calls * calls); 
     64 
     65int roar_vio_clear_calls (struct roar_vio_calls * calls); 
    6466 
    6567int roar_vio_set_inst (struct roar_vio_calls * vio, void * inst); 
  • libroar/vio.c

    r4876 r4963  
    4545 
    4646int roar_vio_init_calls (struct roar_vio_calls * calls) { 
     47 roar_debug_warn_obsolete("roar_vio_init_calls", "roar_vio_clear_calls", NULL); 
     48 
    4749#ifdef _CAN_OPERATE 
    4850 if ( calls == NULL ) { 
     
    7173 return -1; 
    7274#endif 
     75} 
     76 
     77int roar_vio_clear_calls (struct roar_vio_calls * calls) { 
     78 if ( calls == NULL ) { 
     79  roar_err_set(ROAR_ERROR_FAULT); 
     80  return -1; 
     81 } 
     82 
     83 memset((void*)calls, 0, sizeof(struct roar_vio_calls)); 
     84 
     85 return 0; 
    7386} 
    7487 
     
    320333  return -1; 
    321334 
    322  if ( roar_vio_init_calls(calls) == -1 ) 
    323   return -1; 
     335 roar_libroar_nowarn(); 
     336 if ( roar_vio_init_calls(calls) == -1 ) { 
     337  roar_libroar_warn(); 
     338  return -1; 
     339 } 
     340 roar_libroar_warn(); 
    324341 
    325342 return roar_vio_set_fh(calls, fh); 
Note: See TracChangeset for help on using the changeset viewer.