Show
Ignore:
Timestamp:
07/28/11 18:59:49 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1311879589 -0400
git-parent:

[1921baa5ef388809bbacc4367cceb5f71ef0612c]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1311879589 -0400
Message:

last two clang warnings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check_tools_shared.c

    rb553f9a r9e09385  
    138138                             char *name, int name_len, 
    139139                             char *uuid, int uuid_len) { 
     140  if(!in || len == 0) return; 
    140141  if(target) *target = '\0'; 
    141142  if(module) *module = '\0'; 
    142143  if(name) *name = '\0'; 
    143144  if(uuid) *uuid = '\0'; 
    144   if(len >= UUID_STR_LEN) { 
     145  if(uuid && len >= UUID_STR_LEN) { 
    145146    memcpy(uuid, in + len - UUID_STR_LEN, UUID_STR_LEN); 
    146147    uuid[UUID_STR_LEN] = '\0'; 
     
    153154    if(!mcp) return; 
    154155    /* copy in the target */ 
    155     if(target_len > mcp-tcp) { 
     156    if(target && target_len > mcp-tcp) { 
    156157      memcpy(target,tcp,mcp-tcp); 
    157158      target[mcp-tcp] = '\0'; 
     
    161162    if(!ncp) return; 
    162163    /* copy in the module */ 
    163     if(module_len > ncp-mcp) { 
     164    if(module && module_len > ncp-mcp) { 
    164165      memcpy(module,mcp,ncp-mcp); 
    165166      module[ncp-mcp] = '\0'; 
     
    169170    ucp = in + len - UUID_STR_LEN - 1; 
    170171    if(ncp < ucp) { 
    171       if(name_len > ucp-ncp) { 
     172      if(name && name_len > ucp-ncp) { 
    172173        memcpy(name, ncp, ucp-ncp); 
    173174        name[ucp-ncp] = '\0';