diff options
author | Max Kellermann <max@duempel.org> | 2008-10-20 22:18:42 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-20 22:18:42 +0200 |
commit | 1d385190a07007ec7c4f7a880ab16ef4fce88cf4 (patch) | |
tree | 6a29a2dd7ef62cbb8b9b19f6e228143d91a6c5a5 /src/path.c | |
parent | 49260e6db20aa865e485a02fae5c0249d1df0d8a (diff) | |
download | mpd-1d385190a07007ec7c4f7a880ab16ef4fce88cf4.tar.gz mpd-1d385190a07007ec7c4f7a880ab16ef4fce88cf4.tar.xz mpd-1d385190a07007ec7c4f7a880ab16ef4fce88cf4.zip |
path: removed pathcpy_trunc()
There was only one user of pathcpy_trunc(), which can be eliminated.
Diffstat (limited to '')
-rw-r--r-- | src/path.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/path.c b/src/path.c index 5398c7f1a..5b84d3506 100644 --- a/src/path.c +++ b/src/path.c @@ -189,19 +189,6 @@ char *rpp2app_r(char *dst, const char *rel_path) return dst; } -/* this is actually like strlcpy (OpenBSD), but we don't actually want to - * blindly use it everywhere, only for paths that are OK to truncate (for - * error reporting and such */ -void pathcpy_trunc(char *dest, const char *src) -{ - size_t len = strlen(src); - - if (mpd_unlikely(len >= MPD_PATH_MAX)) - len = MPD_PATH_MAX - 1; - memcpy(dest, src, len); - dest[len] = '\0'; -} - char *sanitizePathDup(const char *path) { int len = strlen(path) + 1; |