Changeset 3832:25e79a40b829 in roaraudio


Ignore:
Timestamp:
05/16/10 21:57:38 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

use NULL, roar_mm_*()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroaryiff/connection.c

    r3813 r3832  
    2727 
    2828YConnection *YOpenConnection (const char *start_arg, const char *con_arg) { 
    29  YConnection * ycon = malloc(sizeof(YConnection)); 
     29 YConnection * ycon = roar_mm_malloc(sizeof(YConnection)); 
    3030 struct roar_connection con; 
    3131 char * server = (char *)con_arg; 
     
    4949 if (roar_simple_connect(&con, server, name) == -1) { 
    5050  // Handle start_arg here! 
    51   free(ycon); 
     51  roar_mm_free(ycon); 
    5252  return NULL; 
    5353 } 
     
    5555 if ( (ycon->fd = roar_get_connection_fh(&con)) == -1 ) { 
    5656  roar_disconnect(&con); 
    57   free(ycon); 
     57  roar_mm_free(ycon); 
    5858  return NULL; 
    5959 } 
     
    6363 
    6464void YCloseConnection (YConnection *connection, Boolean no_shutdown) { 
    65  if ( !connection ) 
     65 if ( connection == NULL ) 
    6666  return; 
    6767 
     
    6969 
    7070 
    71  free(connection); 
     71 roar_mm_free(connection); 
    7272} 
    7373 
Note: See TracChangeset for help on using the changeset viewer.