[cairo-commit] src/cairo-malloc-private.h
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sun Mar 25 12:02:44 PDT 2012
src/cairo-malloc-private.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 81c848c83945c19c8cf769daeaa831c086c264f2
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sun Mar 25 15:02:36 2012 -0400
More typo fixes
diff --git a/src/cairo-malloc-private.h b/src/cairo-malloc-private.h
index c021b9f..3414bb8 100644
--- a/src/cairo-malloc-private.h
+++ b/src/cairo-malloc-private.h
@@ -67,7 +67,7 @@
* @a: number of elements to allocate
* @size: size of each element
*
- * Allocates @n*@size memory using _cairo_malloc(), taking care to not
+ * Allocates @a*@size memory using _cairo_malloc(), taking care to not
* overflow when doing the multiplication. Behaves much like
* calloc(), except that the returned memory is not set to zero.
* The memory should be freed using free().
@@ -89,7 +89,7 @@
* @a: number of elements to allocate
* @size: size of each element
*
- * Reallocates @ptr a block of @n*@size memory using realloc(), taking
+ * Reallocates @ptr a block of @a*@size memory using realloc(), taking
* care to not overflow when doing the multiplication. The memory
* should be freed using free().
*
@@ -111,7 +111,7 @@
* @b: second factor of number of elements to allocate
* @size: size of each element
*
- * Allocates @n*@b*@size memory using _cairo_malloc(), taking care to not
+ * Allocates @a*@b*@size memory using _cairo_malloc(), taking care to not
* overflow when doing the multiplication. Behaves like
* _cairo_malloc_ab(). The memory should be freed using free().
*
@@ -129,21 +129,21 @@
/**
* _cairo_malloc_ab_plus_c:
- * @n: number of elements to allocate
+ * @a: number of elements to allocate
* @size: size of each element
- * @k: additional size to allocate
+ * @c: additional size to allocate
*
- * Allocates @n*@ksize+ at k memory using _cairo_malloc(), taking care to not
- * overflow when doing the arithmetic. Behaves like
+ * Allocates @a*@size+ at c memory using _cairo_malloc(), taking care to not
+ * overflow when doing the arithmetic. Behaves similar to
* _cairo_malloc_ab(). The memory should be freed using free().
*
* Return value: A pointer to the newly allocated memory, or %NULL in
* case of malloc() failure or overflow.
*/
-#define _cairo_malloc_ab_plus_c(n, size, k) \
- ((size) && (unsigned) (n) >= INT32_MAX / (unsigned) (size) ? NULL : \
- (unsigned) (k) >= INT32_MAX - (unsigned) (n) * (unsigned) (size) ? NULL : \
- _cairo_malloc((unsigned) (n) * (unsigned) (size) + (unsigned) (k)))
+#define _cairo_malloc_ab_plus_c(a, size, c) \
+ ((size) && (unsigned) (a) >= INT32_MAX / (unsigned) (size) ? NULL : \
+ (unsigned) (c) >= INT32_MAX - (unsigned) (a) * (unsigned) (size) ? NULL : \
+ _cairo_malloc((unsigned) (a) * (unsigned) (size) + (unsigned) (c)))
#endif /* CAIRO_MALLOC_PRIVATE_H */
More information about the cairo-commit
mailing list