aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-20 13:54:17 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-20 13:54:17 +0000
commit99c9118a58c5d13c74aaffb93858ebe7b29adcad (patch)
tree1001c4dd5f45efb18574b5d08e5ad4c962acc5ac /src
parent81091690ba8794b38536b2f171ae56cf714295d7 (diff)
downloadimv-99c9118a58c5d13c74aaffb93858ebe7b29adcad.tar.gz
Remove unnecessary malloc casts
Diffstat (limited to 'src')
-rw-r--r--src/navigator.c2
-rw-r--r--src/texture.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/navigator.c b/src/navigator.c
index 7ece6a0..c6dff06 100644
--- a/src/navigator.c
+++ b/src/navigator.c
@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
void imv_init_navigator(struct imv_navigator *nav)
{
nav->buf_size = 512;
- nav->paths = (char **)malloc(sizeof(char*) * nav->buf_size);
+ nav->paths = malloc(sizeof(char*) * nav->buf_size);
nav->num_paths = 0;
nav->cur_path = 0;
nav->last_move_direction = 1;
diff --git a/src/texture.c b/src/texture.c
index a882320..aa5a4f0 100644
--- a/src/texture.c
+++ b/src/texture.c
@@ -69,7 +69,7 @@ int imv_texture_set_image(struct imv_texture *tex, FIBITMAP *image)
}
tex->num_chunks = tex->num_chunks_wide * tex->num_chunks_tall;
- tex->chunks = (SDL_Texture**)malloc(sizeof(SDL_Texture*) * tex->num_chunks);
+ tex->chunks = malloc(sizeof(SDL_Texture*) * tex->num_chunks);
int failed_at = -1;
for(int y = 0; y < tex->num_chunks_tall; ++y) {
@@ -101,7 +101,7 @@ int imv_texture_set_image(struct imv_texture *tex, FIBITMAP *image)
return 1;
}
- BYTE* pixels = (BYTE*)malloc(4 * tex->width * tex->height);
+ BYTE* pixels = malloc(4 * tex->width * tex->height);
FreeImage_ConvertToRawBits(pixels, image, 4 * tex->width, 32,
FI_RGBA_RED_MASK, FI_RGBA_GREEN_MASK, FI_RGBA_BLUE_MASK, TRUE);