diff options
author | Al Sutton <al@funkyandroid.com> | 2014-11-21 15:56:59 +0000 |
---|---|---|
committer | Al Sutton <al@funkyandroid.com> | 2014-11-21 15:56:59 +0000 |
commit | 2a4b5f9e804f019c0d565c86579f07963989ed1b (patch) | |
tree | 399db7b52a465c81d7523a901652d458655decca /adb | |
parent | 5d8a5ade620be65e0e658dbb99e66398f3ffdc74 (diff) | |
download | system_core-2a4b5f9e804f019c0d565c86579f07963989ed1b.zip system_core-2a4b5f9e804f019c0d565c86579f07963989ed1b.tar.gz system_core-2a4b5f9e804f019c0d565c86579f07963989ed1b.tar.bz2 |
Remove explict use of ASCII encoding
Replace the use of CFStringGetCString with kCFStringEncodingASCII specified
with CFStringGetFileSystemRepresentation which will ensure the correct
character encoding is used to conver the CFString into a NULL terminated
char array suitable for use with POSIX APIs.
Change-Id: Ibab1dc05c4f4db8604d329a493b4241992b8e69d
Diffstat (limited to 'adb')
-rw-r--r-- | adb/get_my_path_darwin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/adb/get_my_path_darwin.c b/adb/get_my_path_darwin.c index 65dd226..ff1396c 100644 --- a/adb/get_my_path_darwin.c +++ b/adb/get_my_path_darwin.c @@ -24,7 +24,7 @@ void get_my_path(char *s, size_t maxLen) CFStringRef executablePathString = CFURLCopyFileSystemPath(executableURL, kCFURLPOSIXPathStyle); CFRelease(executableURL); - CFStringGetCString(executablePathString, s, maxLen, kCFStringEncodingASCII); + CFStringGetFileSystemRepresentation(executablePathString, s, maxLen); CFRelease(executablePathString); } |