aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-06-28 12:52:36 +0200
committerTakashi Iwai <tiwai@suse.de>2007-06-28 12:52:36 +0200
commit8fd7227e397caf43b7c17a7ea64c6f277d8fb92c (patch)
tree3addf0ed8403db8cdf422191803aee7a48867404
parent9a7f44d884f3909a13a42e1e86f8ad14453ce457 (diff)
downloadsalsa-lib-8fd7227e397caf43b7c17a7ea64c6f277d8fb92c.tar.gz
Fix wrong sizeof() for malloc
-rw-r--r--src/ctl_macros.h12
-rw-r--r--src/hwdep_macros.h6
-rw-r--r--src/mixer_macros.h2
-rw-r--r--src/pcm_macros.h14
-rw-r--r--src/rawmidi_macros.h6
-rw-r--r--src/timer_macros.h10
6 files changed, 25 insertions, 25 deletions
diff --git a/src/ctl_macros.h b/src/ctl_macros.h
index df74649..1f0efd6 100644
--- a/src/ctl_macros.h
+++ b/src/ctl_macros.h
@@ -305,7 +305,7 @@ size_t snd_ctl_elem_id_sizeof(void)
static inline
int snd_ctl_elem_id_malloc(snd_ctl_elem_id_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -411,7 +411,7 @@ size_t snd_ctl_card_info_sizeof(void)
static inline
int snd_ctl_card_info_malloc(snd_ctl_card_info_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -487,7 +487,7 @@ size_t snd_ctl_event_sizeof(void)
static inline
int snd_ctl_event_malloc(snd_ctl_event_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -526,7 +526,7 @@ size_t snd_ctl_elem_list_sizeof(void)
static inline
int snd_ctl_elem_list_malloc(snd_ctl_elem_list_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -627,7 +627,7 @@ size_t snd_ctl_elem_info_sizeof(void)
static inline
int snd_ctl_elem_info_malloc(snd_ctl_elem_info_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -912,7 +912,7 @@ size_t snd_ctl_elem_value_sizeof(void)
static inline
int snd_ctl_elem_value_malloc(snd_ctl_elem_value_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
diff --git a/src/hwdep_macros.h b/src/hwdep_macros.h
index e2f188e..4e24730 100644
--- a/src/hwdep_macros.h
+++ b/src/hwdep_macros.h
@@ -107,7 +107,7 @@ size_t snd_hwdep_info_sizeof(void)
static inline
int snd_hwdep_info_malloc(snd_hwdep_info_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -170,7 +170,7 @@ size_t snd_hwdep_dsp_status_sizeof(void)
static inline
int snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -228,7 +228,7 @@ size_t snd_hwdep_dsp_image_sizeof(void)
static inline
int snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
diff --git a/src/mixer_macros.h b/src/mixer_macros.h
index 2608adf..e83d4e3 100644
--- a/src/mixer_macros.h
+++ b/src/mixer_macros.h
@@ -518,7 +518,7 @@ size_t snd_mixer_selem_id_sizeof(void)
static inline
int snd_mixer_selem_id_malloc(snd_mixer_selem_id_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
diff --git a/src/pcm_macros.h b/src/pcm_macros.h
index 270ad1d..b64f4b3 100644
--- a/src/pcm_macros.h
+++ b/src/pcm_macros.h
@@ -599,7 +599,7 @@ size_t snd_pcm_access_mask_sizeof(void)
static inline
int snd_pcm_access_mask_malloc(snd_pcm_access_mask_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -663,7 +663,7 @@ size_t snd_pcm_format_mask_sizeof(void)
static inline
int snd_pcm_format_mask_malloc(snd_pcm_format_mask_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -727,7 +727,7 @@ size_t snd_pcm_subformat_mask_sizeof(void)
static inline
int snd_pcm_subformat_mask_malloc(snd_pcm_subformat_mask_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -795,7 +795,7 @@ size_t snd_pcm_hw_params_sizeof(void)
static inline
int snd_pcm_hw_params_malloc(snd_pcm_hw_params_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -1770,7 +1770,7 @@ size_t snd_pcm_sw_params_sizeof(void)
static inline
int snd_pcm_sw_params_malloc(snd_pcm_sw_params_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -1940,7 +1940,7 @@ size_t snd_pcm_status_sizeof(void)
static inline
int snd_pcm_status_malloc(snd_pcm_status_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -2025,7 +2025,7 @@ size_t snd_pcm_info_sizeof(void)
static inline
int snd_pcm_info_malloc(snd_pcm_info_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
diff --git a/src/rawmidi_macros.h b/src/rawmidi_macros.h
index 9e91a40..40bdf83 100644
--- a/src/rawmidi_macros.h
+++ b/src/rawmidi_macros.h
@@ -77,7 +77,7 @@ size_t snd_rawmidi_info_sizeof(void)
static inline
int snd_rawmidi_info_malloc(snd_rawmidi_info_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!ptr)
return -ENOMEM;
return 0;
@@ -193,7 +193,7 @@ size_t snd_rawmidi_params_sizeof(void)
static inline
int snd_rawmidi_params_malloc(snd_rawmidi_params_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!ptr)
return -ENOMEM;
return 0;
@@ -283,7 +283,7 @@ size_t snd_rawmidi_status_sizeof(void)
static inline
int snd_rawmidi_status_malloc(snd_rawmidi_status_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!ptr)
return -ENOMEM;
return 0;
diff --git a/src/timer_macros.h b/src/timer_macros.h
index eba0cbf..9e3eba4 100644
--- a/src/timer_macros.h
+++ b/src/timer_macros.h
@@ -124,7 +124,7 @@ size_t snd_timer_id_sizeof(void)
static inline
int snd_timer_id_malloc(snd_timer_id_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -211,7 +211,7 @@ size_t snd_timer_ginfo_sizeof(void)
static inline
int snd_timer_ginfo_malloc(snd_timer_ginfo_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -299,7 +299,7 @@ size_t snd_timer_info_sizeof(void)
static inline
int snd_timer_info_malloc(snd_timer_info_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -356,7 +356,7 @@ size_t snd_timer_params_sizeof(void)
static inline
int snd_timer_params_malloc(snd_timer_params_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;
@@ -472,7 +472,7 @@ size_t snd_timer_status_sizeof(void)
static inline
int snd_timer_status_malloc(snd_timer_status_t **ptr)
{
- *ptr = calloc(1, sizeof(*ptr));
+ *ptr = calloc(1, sizeof(**ptr));
if (!*ptr)
return -ENOMEM;
return 0;