lib/mangle: const quialifier cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2018-07-20 15:31:42 +02:00
parent eb06d5d4b2
commit 78c66fc61d
3 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@ extern char *mangle(const char *s);
extern void unmangle_to_buffer(const char *s, char *buf, size_t len);
extern size_t unhexmangle_to_buffer(const char *s, char *buf, size_t len);
extern char *unmangle(const char *s, char **end);
extern char *unmangle(const char *s, const char **end);
static inline void unmangle_string(char *s)
{

View File

@ -94,20 +94,20 @@ size_t unhexmangle_to_buffer(const char *s, char *buf, size_t len)
return buf - buf0 + 1;
}
static inline char *skip_nonspaces(const char *s)
static inline const char *skip_nonspaces(const char *s)
{
while (*s && !(*s == ' ' || *s == '\t'))
s++;
return (char *) s;
return s;
}
/*
* Returns mallocated buffer or NULL in case of error.
*/
char *unmangle(const char *s, char **end)
char *unmangle(const char *s, const char **end)
{
char *buf;
char *e;
const char *e;
size_t sz;
if (!s)

View File

@ -272,7 +272,7 @@ static int mnt_parse_utab_line(struct libmnt_fs *fs, const char *s)
assert(!fs->target);
while (p && *p) {
char *end = NULL;
const char *end = NULL;
while (*p == ' ') p++;
if (!*p)