diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2017-01-31 16:16:15 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-02-06 23:43:46 +0100 |
commit | 91d0e0e4597c5ed341ae56ea52dec679230683d4 (patch) | |
tree | d212f0a5cd2fed9c5bae9159254eeda6110a6701 /ax25/beacon.c | |
parent | 1eff1c10b445844571b7be4aa545788722325484 (diff) |
ax25: Delete useless casts of malloc's return value.
malloc returns a void pointer so no cast is necessary when
assigning to a pointer type.
Found with below coccinelle script:
@malloccast@
type T;
@@
- (T *)
malloc(...)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'ax25/beacon.c')
-rw-r--r-- | ax25/beacon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ax25/beacon.c b/ax25/beacon.c index b212ac8..d4f39c7 100644 --- a/ax25/beacon.c +++ b/ax25/beacon.c @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) } if (srccall != NULL && strcmp(srccall, portcall) != 0) { - if ((addr = (char *) malloc(strlen(srccall) + 1 + strlen(portcall) + 1)) == NULL) + if ((addr = malloc(strlen(srccall) + 1 + strlen(portcall) + 1)) == NULL) return 1; sprintf(addr, "%s %s", srccall, portcall); } else { |