FIO_determineDstName: extract dstFileNameEndPos variable
This commit is contained in:
+3
-2
@@ -2210,8 +2210,9 @@ FIO_determineDstName(const char* srcFileName)
|
|||||||
|
|
||||||
/* return dst name == src name truncated from suffix */
|
/* return dst name == src name truncated from suffix */
|
||||||
assert(dstFileNameBuffer != NULL);
|
assert(dstFileNameBuffer != NULL);
|
||||||
memcpy(dstFileNameBuffer, srcFileName, sfnSize - suffixSize);
|
size_t dstFileNameEndPos = sfnSize - suffixSize;
|
||||||
dstFileNameBuffer[sfnSize-suffixSize] = '\0';
|
memcpy(dstFileNameBuffer, srcFileName, dstFileNameEndPos);
|
||||||
|
dstFileNameBuffer[dstFileNameEndPos] = '\0';
|
||||||
return dstFileNameBuffer;
|
return dstFileNameBuffer;
|
||||||
|
|
||||||
/* note : dstFileNameBuffer memory is not going to be free */
|
/* note : dstFileNameBuffer memory is not going to be free */
|
||||||
|
|||||||
Reference in New Issue
Block a user