Changeset 4873:98d17d4deeec in roaraudio for libroar/notify.c


Ignore:
Timestamp:
04/26/11 11:03:46 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

make use of new error stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/notify.c

    r4708 r4873  
    6060static struct roar_notify_core * _libroar_notify_core = NULL; 
    6161 
    62 #define _CKRCORE(ret) if ( core == NULL ) { if ( _libroar_notify_core == NULL ) { roar_errno = ROAR_ERROR_INVAL; return (ret); } else { core = _libroar_notify_core; } } 
     62#define _CKRCORE(ret) if ( core == NULL ) { if ( _libroar_notify_core == NULL ) { roar_err_set(ROAR_ERROR_INVAL); return (ret); } else { core = _libroar_notify_core; } } 
    6363#define _CKICORE() _CKRCORE(-1) 
    6464 
     
    9797   break; 
    9898  default: 
    99     roar_errno = ROAR_ERROR_INVAL; 
     99    roar_err_set(ROAR_ERROR_INVAL); 
    100100    return NULL; 
    101101   break; 
     
    172172int roar_notify_core_new_global(ssize_t lists) { 
    173173 if ( _libroar_notify_core != NULL ) { 
    174   roar_errno = ROAR_ERROR_INVAL; 
     174  roar_err_set(ROAR_ERROR_INVAL); 
    175175  return -1; 
    176176 } 
     
    202202 if ( event == NULL || cb == NULL ) { 
    203203  ROAR_DBG("roar_notify_core_subscribe(core=%p, event=%p, cb=%p, userdata=%p) = NULL // errno = EINVAL", core, event, cb, userdata); 
    204   roar_errno = ROAR_ERROR_INVAL; 
     204  roar_err_set(ROAR_ERROR_FAULT); 
    205205  return NULL; 
    206206 } 
     
    246246 
    247247 if ( subscriber == NULL ) { 
    248   roar_errno = ROAR_ERROR_INVAL; 
     248  roar_err_set(ROAR_ERROR_FAULT); 
    249249  return -1; 
    250250 } 
     
    275275 
    276276 if ( event == NULL ) { 
    277   roar_errno = ROAR_ERROR_INVAL; 
     277  roar_err_set(ROAR_ERROR_FAULT); 
    278278  return -1; 
    279279 } 
Note: See TracChangeset for help on using the changeset viewer.