Merge branch 'rs/code-cleaning'
* rs/code-cleaning: remote-testsvn: use internal argv_array of struct child_process in cmd_import() bundle: use internal argv_array of struct child_process in create_bundle() fast-import: use hashcmp() for SHA1 hash comparison transport: simplify fetch_objs_via_rsync() using argv_array run-command: use internal argv_array of struct child_process in run_hook_ve() use commit_list_count() to count the members of commit_lists strbuf: use strbuf_addstr() for adding C strings
This commit is contained in:
6
path.c
6
path.c
@ -275,16 +275,16 @@ char *expand_user_path(const char *path)
|
||||
const char *home = getenv("HOME");
|
||||
if (!home)
|
||||
goto return_null;
|
||||
strbuf_add(&user_path, home, strlen(home));
|
||||
strbuf_addstr(&user_path, home);
|
||||
} else {
|
||||
struct passwd *pw = getpw_str(username, username_len);
|
||||
if (!pw)
|
||||
goto return_null;
|
||||
strbuf_add(&user_path, pw->pw_dir, strlen(pw->pw_dir));
|
||||
strbuf_addstr(&user_path, pw->pw_dir);
|
||||
}
|
||||
to_copy = first_slash;
|
||||
}
|
||||
strbuf_add(&user_path, to_copy, strlen(to_copy));
|
||||
strbuf_addstr(&user_path, to_copy);
|
||||
return strbuf_detach(&user_path, NULL);
|
||||
return_null:
|
||||
strbuf_release(&user_path);
|
||||
|
Reference in New Issue
Block a user