Changeset 787:a69f7ee33a38 in roaraudio for libroaryiff


Ignore:
Timestamp:
09/17/08 02:54:08 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

check for the server to not be NULL before use strcmp()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroaryiff/connection.c

    r688 r787  
    3636 // in the heder files. So we use a hard coded value from the docs 
    3737 
    38  if ( strcmp(server, "127.0.0.1:9433") == 0 || 
    39       strcmp(server, "127.0.0.1")      == 0 ||   // \\                                         // 
    40       strcmp(server, "localhost")      == 0 ||   //   => Don't know if this is valid for libY  // 
    41       strcmp(server, "localhost:9433") == 0 ) {  // //   but we support it.                    // 
     38 if ( server != NULL ) { 
     39  if ( strcmp(server, "127.0.0.1:9433") == 0 || 
     40       strcmp(server, "127.0.0.1")      == 0 ||   // \\                                         // 
     41       strcmp(server, "localhost")      == 0 ||   //   => Don't know if this is valid for libY  // 
     42       strcmp(server, "localhost:9433") == 0 ) {  // //   but we support it.                    // 
    4243 
    43   server = NULL; // try default locations 
     44   server = NULL; // try default locations 
     45  } 
    4446 } 
    4547 
Note: See TracChangeset for help on using the changeset viewer.