Changeset 6025:0edaf515bdbf in roaraudio


Ignore:
Timestamp:
07/14/14 10:06:24 (10 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

some minor updates of string function usage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/socket.c

    r6022 r6025  
    610610 
    611611   if ( *(del+2) == '#' ) { // assume we have node::#num 
    612     port = atoi(del+2); 
     612    port = atoi(del+3); 
    613613   } 
    614614 
    615615   if ( port ) { 
    616     snprintf(obj, 7, "%i", port); // no need for snprintf() as dec(port) is smaller than obj[] 
     616    snprintf(obj, sizeof(obj), "%i", port); // no need for snprintf() as dec(port) is smaller than obj[] 
    617617   } else { 
    618     *obj = 0; 
    619     strncat(obj, del+2, 79); 
     618    roar_mm_strlcpy(obj, del+2, sizeof(obj)); 
    620619   } 
    621620 
Note: See TracChangeset for help on using the changeset viewer.