Changeset 5118:9a1796a3f8f9 for lib.c

Show
Ignore:
Timestamp:
2007-04-10 19:23:16 (21 months ago)
Author:
Brendan Cully <brendan@…>
Branch:
HEAD
Message:

Fix some warnings

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lib.c

    r5092 r5118  
    867867    const char *dir, size_t dirlen, const char *fname, size_t fnamelen) 
    868868{ 
     869  size_t req; 
     870  size_t offset = 0; 
     871 
    869872  if (dstlen == 0) 
    870873    return NULL; /* probably should not mask errors like this */ 
    871874 
    872875  /* size check */ 
    873   size_t req = dirlen + fnamelen + 1; /* +1 for the trailing nul */ 
     876  req = dirlen + fnamelen + 1; /* +1 for the trailing nul */ 
    874877  if (dirlen && fnamelen) 
    875878    req++; /* when both components are non-nul, we add a "/" in between */ 
     
    885888  } 
    886889 
    887   size_t offset = 0; 
    888890  if (dirlen) { /* when dir is not empty */ 
    889891    memcpy(dst, dir, dirlen);