From bbeced26f6ce167ad93817ebe7180cd22ef33c86 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Thu, 26 Jun 2014 11:52:05 -0400 Subject: llstat: modify path in place This makes llstat's signature differ from lstat's, but we never actually use it on a const string and this saves a large number of strdup's. This also allows stripping multiple trailing slashes and corrects a bug where calling llstat on "/" would result in calling lstat on an empty string. Signed-off-by: Andrew Gregory --- src/common/util-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/util-common.h') diff --git a/src/common/util-common.h b/src/common/util-common.h index 5f04b00c..576702fa 100644 --- a/src/common/util-common.h +++ b/src/common/util-common.h @@ -25,7 +25,7 @@ const char *mbasename(const char *path); char *mdirname(const char *path); -int llstat(const char *path, struct stat *buf); +int llstat(char *path, struct stat *buf); #ifndef HAVE_STRNDUP char *strndup(const char *s, size_t n); -- cgit v1.2.3-24-g4f1b