aboutsummaryrefslogtreecommitdiffhomepage
path: root/path.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-01-29 23:22:42 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-01-29 23:22:42 -0800
commit316f81119f24471882f2d394cd332bcc1312da4d (patch)
treee040a7a439e5566e3a0518f0cbb092e8a8b788b2 /path.cpp
parent8d016040abaa60416dd1e3625b1727dcd84f3e79 (diff)
Excised some more halloc
Diffstat (limited to 'path.cpp')
-rw-r--r--path.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/path.cpp b/path.cpp
index 53c4274d..be38eaa8 100644
--- a/path.cpp
+++ b/path.cpp
@@ -128,7 +128,7 @@ bool path_get_path_string(const wcstring &cmd_str, wcstring &output, const env_v
}
-wchar_t *path_get_path( void *context, const wchar_t *cmd )
+wchar_t *path_get_path( const wchar_t *cmd )
{
int err = ENOENT;
@@ -147,7 +147,7 @@ wchar_t *path_get_path( void *context, const wchar_t *cmd )
}
if( S_ISREG(buff.st_mode) )
- return halloc_wcsdup( context, cmd );
+ return wcsdup( cmd );
else
{
errno = EACCES;
@@ -180,7 +180,7 @@ wchar_t *path_get_path( void *context, const wchar_t *cmd )
/*
Allocate string long enough to hold the whole command
*/
- wchar_t *new_cmd = (wchar_t *)halloc( context, sizeof(wchar_t)*(wcslen(cmd)+path.size()+2) );
+ wchar_t *new_cmd = (wchar_t *)calloc(wcslen(cmd)+path.size()+2, sizeof(wchar_t) );
/*
We tokenize a copy of the path, since strtok modifies