Skip to content

Commit 59bf479

Browse files
authored
Swap calloc(3) argument order to match parameter names
1 parent 5db2a0c commit 59bf479

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

properties.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ objc_property_t class_getProperty(Class cls, const char *name)
285285
{
286286
return NULL;
287287
}
288-
objc_property_t *list = calloc(sizeof(objc_property_t), count);
288+
objc_property_t *list = calloc(count, sizeof(objc_property_t));
289289
unsigned int out = 0;
290290
for (struct objc_property_list *l=properties ; NULL!=l ; l=l->next)
291291
{
@@ -423,7 +423,7 @@ objc_property_t class_getProperty(Class cls, const char *name)
423423
}
424424
count++;
425425
}
426-
objc_property_attribute_t *propAttrs = calloc(sizeof(objc_property_attribute_t), count);
426+
objc_property_attribute_t *propAttrs = calloc(count, sizeof(objc_property_attribute_t));
427427
memcpy(propAttrs, attrs, count * sizeof(objc_property_attribute_t));
428428
if (NULL != outCount)
429429
{

0 commit comments

Comments
 (0)