summaryrefslogtreecommitdiff
path: root/src/pal/src/safecrt/tsplitpath_s.inl
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/safecrt/tsplitpath_s.inl')
-rw-r--r--src/pal/src/safecrt/tsplitpath_s.inl16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pal/src/safecrt/tsplitpath_s.inl b/src/pal/src/safecrt/tsplitpath_s.inl
index 3a14fa5900..77dd32a190 100644
--- a/src/pal/src/safecrt/tsplitpath_s.inl
+++ b/src/pal/src/safecrt/tsplitpath_s.inl
@@ -27,7 +27,7 @@ errno_t __cdecl _FUNC_NAME(
int drive_set = 0;
size_t length = 0;
int bEinval = 0;
-
+
/* validation section */
if (_Path == NULL)
{
@@ -138,9 +138,9 @@ errno_t __cdecl _FUNC_NAME(
goto error_erange;
}
_TCSNCPY_S(_Dir, _DirSize, _Path, length);
-
+
// Normalize the path seperator
- int iIndex;
+ size_t iIndex;
for(iIndex = 0; iIndex < length; iIndex++)
{
if (_Dir[iIndex] == _T('\\'))
@@ -184,7 +184,7 @@ errno_t __cdecl _FUNC_NAME(
// set length to 1 to get the "." in filename buffer.
length = 1;
}
-
+
if (_FilenameSize <= length)
{
goto error_erange;
@@ -200,7 +200,7 @@ errno_t __cdecl _FUNC_NAME(
// At this time, _Path is pointing to the character after the last slash found.
// (See comments and code above for clarification).
//
- // Returns extension as empty string for strings like "/.".
+ // Returns extension as empty string for strings like "/.".
if (dot > _Path)
{
length = (size_t)(tmp - dot);
@@ -208,13 +208,13 @@ errno_t __cdecl _FUNC_NAME(
{
goto error_erange;
}
-
+
/* Since dot pointed to the ".", make sure we actually have an extension
like ".cmd" and not just ".", OR
-
+
Confirm that its a string like "/.." - for this, return the
second "." in the extension part.
-
+
However, for strings like "/myfile.", return empty string
in extension buffer.
*/