Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/common/util-common.h
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-06-26 11:52:05 -0400
committerAllan McRae <allan@archlinux.org>2014-08-03 18:46:32 +1000
commitbbeced26f6ce167ad93817ebe7180cd22ef33c86 (patch)
treedb4bcc3bf951847ba0a4617e6f083c7aa104ced3 /src/common/util-common.h
parente8de265f8039165dc32ffb78f6a6a5eb0c1514ad (diff)
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 <andrew.gregory.8@gmail.com>
Diffstat (limited to 'src/common/util-common.h')
-rw-r--r--src/common/util-common.h2
1 files changed, 1 insertions, 1 deletions
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);