summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FileSpec.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-07-01 17:07:48 +0000
committerGreg Clayton <gclayton@apple.com>2010-07-01 17:07:48 +0000
commita5d24f6683fa716f8220e4f2d507a369c1847b4d (patch)
tree6f852cd25b41a4e0bbd77b866465683a3c42b9f7 /lldb/source/Core/FileSpec.cpp
parentf56ab7b6bec0b6af4bb9aeff5513e1e5c6ee6b6c (diff)
downloadbcm5719-llvm-a5d24f6683fa716f8220e4f2d507a369c1847b4d.tar.gz
bcm5719-llvm-a5d24f6683fa716f8220e4f2d507a369c1847b4d.zip
Added a missing static function prototype to FileSpec.h for ResolveUsername.
Did a bit of code formatting and cleanup. llvm-svn: 107403
Diffstat (limited to 'lldb/source/Core/FileSpec.cpp')
-rw-r--r--lldb/source/Core/FileSpec.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lldb/source/Core/FileSpec.cpp b/lldb/source/Core/FileSpec.cpp
index 83e3b7c4695..a803aba2765 100644
--- a/lldb/source/Core/FileSpec.cpp
+++ b/lldb/source/Core/FileSpec.cpp
@@ -66,23 +66,23 @@ FileSpec::ResolveUsername (const char *src_path, char *dst_path, size_t dst_len)
if (src_path == NULL || src_path[0] == '\0')
return 0;
-
+
// If there's no ~, then just copy src_path straight to dst_path (they may be the same string...)
if (src_path[0] != '~')
{
int len = strlen (src_path);
if (len >= dst_len)
{
- bcopy(src_path, dst_path, dst_len - 1);
- dst_path[dst_len] = '\0';
+ ::bcopy (src_path, dst_path, dst_len - 1);
+ dst_path[dst_len] = '\0';
}
else
- bcopy(src_path, dst_path, len + 1);
-
+ ::bcopy (src_path, dst_path, len + 1);
+
return len;
}
- char *first_slash = strchr(src_path, '/');
+ char *first_slash = ::strchr (src_path, '/');
char remainder[PATH_MAX];
if (first_slash == NULL)
@@ -94,13 +94,13 @@ FileSpec::ResolveUsername (const char *src_path, char *dst_path, size_t dst_len)
else
{
int user_name_len = first_slash - src_path - 1;
- memcpy(user_home, src_path + 1, user_name_len);
+ ::memcpy (user_home, src_path + 1, user_name_len);
user_home[user_name_len] = '\0';
user_name = user_home;
- strcpy(remainder, first_slash);
+ ::strcpy (remainder, first_slash);
}
-
+
if (user_name == NULL)
return 0;
// User name of "" means the current user...
@@ -114,7 +114,7 @@ FileSpec::ResolveUsername (const char *src_path, char *dst_path, size_t dst_len)
}
else
{
- user_entry = getpwnam (user_name);
+ user_entry = ::getpwnam (user_name);
if (user_entry != NULL)
home_dir = user_entry->pw_dir;
}
OpenPOWER on IntegriCloud