diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-08 22:31:41 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-08-08 22:31:41 -0700 |
commit | 9a74512ffdc1628f1b87d2191439915c63b9104f (patch) | |
tree | 8a58dec4a8604228908b09cdb69a286d89c271d2 /src/watch.c | |
parent | 4033226105fa861ab5f0276850afc24c0fa45406 (diff) |
Stop casting return values from malloc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/watch.c')
-rw-r--r-- | src/watch.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/watch.c b/src/watch.c index 42fb715..abbc265 100644 --- a/src/watch.c +++ b/src/watch.c @@ -48,8 +48,7 @@ IceAddConnectionWatch ( _IceWatchProc *newWatchProc; int i; - if ((newWatchProc = (_IceWatchProc *) malloc ( - sizeof (_IceWatchProc))) == NULL) + if ((newWatchProc = malloc (sizeof (_IceWatchProc))) == NULL) { return (0); } @@ -74,7 +73,7 @@ IceAddConnectionWatch ( for (i = 0; i < _IceConnectionCount; i++) { - _IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *) + _IceWatchedConnection *newWatchedConn = malloc (sizeof (_IceWatchedConnection)); newWatchedConn->iceConn = _IceConnectionObjs[i]; @@ -140,7 +139,7 @@ _IceConnectionOpened ( while (watchProc) { - _IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *) + _IceWatchedConnection *newWatchedConn = malloc (sizeof (_IceWatchedConnection)); _IceWatchedConnection *watchedConn; |