summaryrefslogtreecommitdiffstats
path: root/lib/mangle.c
diff options
context:
space:
mode:
authorKarel Zak2010-12-07 00:08:11 +0100
committerKarel Zak2011-01-03 12:28:47 +0100
commit5ac6a133276d200e1736853e58a05887e7f75e90 (patch)
tree29dfa064cd89c1c155c10186739f77a76ce932ef /lib/mangle.c
parentlibmount: minor fixes in cache.c (diff)
downloadkernel-qcow2-util-linux-5ac6a133276d200e1736853e58a05887e7f75e90.tar.gz
kernel-qcow2-util-linux-5ac6a133276d200e1736853e58a05887e7f75e90.tar.xz
kernel-qcow2-util-linux-5ac6a133276d200e1736853e58a05887e7f75e90.zip
libmount: cleanup mangle() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib/mangle.c')
-rw-r--r--lib/mangle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mangle.c b/lib/mangle.c
index 398323a37..17ca80951 100644
--- a/lib/mangle.c
+++ b/lib/mangle.c
@@ -69,20 +69,20 @@ void unmangle_to_buffer(const char *s, char *buf, size_t len)
*buf = '\0';
}
-static inline const char *skip_nonspaces(const char *s)
+static inline char *skip_nonspaces(const char *s)
{
while (*s && !(*s == ' ' || *s == '\t'))
s++;
- return s;
+ return (char *) s;
}
/*
* Returns mallocated buffer or NULL in case of error.
*/
-char *unmangle(const char *s, const char **end)
+char *unmangle(const char *s, char **end)
{
char *buf;
- const char *e;
+ char *e;
size_t sz;
if (!s)