diff options
Diffstat (limited to 'libdimension/camera.c')
-rw-r--r-- | libdimension/camera.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libdimension/camera.c b/libdimension/camera.c index eeb399c..9d30731 100644 --- a/libdimension/camera.c +++ b/libdimension/camera.c @@ -20,18 +20,13 @@ #include "dimension.h" #include <errno.h> -#include <stdlib.h> /* For malloc */ /* Allocate a new dummy camera */ dmnsn_camera * dmnsn_new_camera() { - dmnsn_camera *camera = malloc(sizeof(dmnsn_camera)); - if (camera) { - camera->free_fn = NULL; - } else { - errno = ENOMEM; - } + dmnsn_camera *camera = dmnsn_malloc(sizeof(dmnsn_camera)); + camera->free_fn = NULL; return camera; } |