staging: dgap: Remove useless cast on NULL
authorTapasweni Pathak <tapaswenipathak@gmail.com>
Thu, 30 Oct 2014 12:53:11 +0000 (18:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Oct 2014 20:09:15 +0000 (13:09 -0700)
Cast on NULL to a pointer type is not required. This
patch removes NULL casted to some pointer type.

The sematic patch used is:
@r@
type T;
@@
- (T *)NULL
+ NULL

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c

index 105c3b8f4024643b2278c9726e6e42a63714cd02..ed356f1bdece22684cd1c149e1e15a41712ca511 100644 (file)
@@ -7028,7 +7028,7 @@ static char *dgap_sindex(char *string, char *group)
        char *ptr;
 
        if (!string || !group)
-               return (char *) NULL;
+               return NULL;
 
        if (*group == '^') {
                group++;
@@ -7049,7 +7049,7 @@ static char *dgap_sindex(char *string, char *group)
                }
        }
 
-       return (char *) NULL;
+       return NULL;
 }
 
 /*