]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
include/strutils: remove unnecessary cast
authorKarel Zak <kzak@redhat.com>
Fri, 20 Jul 2018 10:52:09 +0000 (12:52 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 20 Jul 2018 10:52:09 +0000 (12:52 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
include/strutils.h

index 5d07fcc7c010ccbbb0400bedb04ea7f021b5a751..2e35be3c5eba9d373834bfef53ff03cf48006975 100644 (file)
@@ -149,12 +149,12 @@ static inline const char *endswith(const char *s, const char *postfix)
        size_t pl = postfix ? strlen(postfix) : 0;
 
        if (pl == 0)
-               return (char *)s + sl;
+               return s + sl;
        if (sl < pl)
                return NULL;
        if (memcmp(s + sl - pl, postfix, pl) != 0)
                return NULL;
-       return (char *)s + sl - pl;
+       return s + sl - pl;
 }
 
 /*