summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-03-05 07:13:12 +0000
committerPaul Smith <psmith@gnu.org>1999-03-05 07:13:12 +0000
commita6a9ebb54f67cb13a07dd3b815c258ae8c35b3ac (patch)
treecb34f435ff0d7400690485733f42e2335d4d163f /main.c
parent9e6ba6a148aa6e4a6aed496d91bac44323325445 (diff)
downloadgunmake-a6a9ebb54f67cb13a07dd3b815c258ae8c35b3ac.tar.gz
* Define and use xstrdup() instead of strdup().
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index 7c141e8..4bae415 100644
--- a/main.c
+++ b/main.c
@@ -568,7 +568,7 @@ find_and_set_default_shell(char *token)
} else if (file_exists_p(search_token)) {
/* search token path was found */
sprintf(sh_path, "%s", search_token);
- default_shell = strdup(w32ify(sh_path,0));
+ default_shell = xstrdup(w32ify(sh_path,0));
if (debug_flag)
printf("find_and_set_shell setting default_shell = %s\n", default_shell);
sh_found = 1;
@@ -590,7 +590,7 @@ find_and_set_default_shell(char *token)
if (dir_file_exists_p(p, search_token)) {
sprintf(sh_path, "%s/%s", p, search_token);
- default_shell = strdup(w32ify(sh_path,0));
+ default_shell = xstrdup(w32ify(sh_path,0));
sh_found = 1;
*ep = PATH_SEPARATOR_CHAR;
@@ -607,7 +607,7 @@ find_and_set_default_shell(char *token)
/* be sure to check last element of Path */
if (p && *p && dir_file_exists_p(p, search_token)) {
sprintf(sh_path, "%s/%s", p, search_token);
- default_shell = strdup(w32ify(sh_path,0));
+ default_shell = xstrdup(w32ify(sh_path,0));
sh_found = 1;
}
@@ -941,7 +941,7 @@ int main (int argc, char ** argv)
if (strpbrk(argv[0], "/:\\") ||
strstr(argv[0], "..") ||
!strncmp(argv[0], "//", 2))
- argv[0] = strdup(w32ify(argv[0],1));
+ argv[0] = xstrdup(w32ify(argv[0],1));
#else /* WINDOWS32 */
if (current_directory[0] != '\0'
&& argv[0] != 0 && argv[0][0] != '/' && index (argv[0], '/') != 0)