summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/strutils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/strutils.c b/lib/strutils.c
index 88ea6f277..b71dde596 100644
--- a/lib/strutils.c
+++ b/lib/strutils.c
@@ -486,7 +486,7 @@ void strtotimeval_or_err(const char *str, struct timeval *tv, const char *errmes
* Converts stat->st_mode to ls(1)-like mode string. The size of "str" must
* be 11 bytes.
*/
-void xstrmode(mode_t mode, char *str)
+char *xstrmode(mode_t mode, char *str)
{
unsigned short i = 0;
@@ -521,6 +521,8 @@ void xstrmode(mode_t mode, char *str)
? (mode & S_IXOTH ? 't' : 'T')
: (mode & S_IXOTH ? 'x' : '-'));
str[i] = '\0';
+
+ return str;
}
/*