Changeset 5118:9a1796a3f8f9 for lib.c
Legend:
- Unmodified
- Added
- Removed
-
lib.c
r5092 r5118 867 867 const char *dir, size_t dirlen, const char *fname, size_t fnamelen) 868 868 { 869 size_t req; 870 size_t offset = 0; 871 869 872 if (dstlen == 0) 870 873 return NULL; /* probably should not mask errors like this */ 871 874 872 875 /* size check */ 873 size_treq = dirlen + fnamelen + 1; /* +1 for the trailing nul */876 req = dirlen + fnamelen + 1; /* +1 for the trailing nul */ 874 877 if (dirlen && fnamelen) 875 878 req++; /* when both components are non-nul, we add a "/" in between */ … … 885 888 } 886 889 887 size_t offset = 0;888 890 if (dirlen) { /* when dir is not empty */ 889 891 memcpy(dst, dir, dirlen);
