diff options
author | Max Kellermann <max@duempel.org> | 2009-01-04 19:37:19 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-04 19:37:19 +0100 |
commit | da693822730d1712d44da85389e4d8b659b3b5df (patch) | |
tree | c6af7f8c5eab082cbdab029066b8f8758906d6b3 /src/path.c | |
parent | 1a04e571686ea9c9bfca2701564a41f7d9d12a9e (diff) | |
download | mpd-da693822730d1712d44da85389e4d8b659b3b5df.tar.gz mpd-da693822730d1712d44da85389e4d8b659b3b5df.tar.xz mpd-da693822730d1712d44da85389e4d8b659b3b5df.zip |
path: removed pfx_dir()
Use GLib's g_build_filename() instead of pfx_dir().
Diffstat (limited to '')
-rw-r--r-- | src/path.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/path.c b/src/path.c index 19a1f4151..2698957f7 100644 --- a/src/path.c +++ b/src/path.c @@ -107,20 +107,3 @@ void path_global_finish(void) { g_free(fs_charset); } - -char *pfx_dir(char *dst, - const char *path, const size_t path_len, - const char *pfx, const size_t pfx_len) -{ - if (G_UNLIKELY((pfx_len + path_len + 1) >= MPD_PATH_MAX)) - g_error("Cannot prefix '%s' to '%s', PATH_MAX: %d", - pfx, path, MPD_PATH_MAX); - - /* memmove allows dst == path */ - memmove(dst + pfx_len + 1, path, path_len + 1); - memcpy(dst, pfx, pfx_len); - dst[pfx_len] = '/'; - - /* this is weird, but directory.c can use it more safely/efficiently */ - return (dst + pfx_len + 1); -} |