Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Use UCL_COUNT to return the number of elements of an ucl_object as it return 0 if the object is NULL
Baptiste Daroussin committed 12 years ago
commit 8cfe46ab69165903fe692e246a50caf276a9e78b
parent 2addf97
1 file changed +2 -1
modified libpkg/pkg_object.c
@@ -27,6 +27,7 @@
#include <assert.h>
#include <ucl.h>
#include "pkg.h"
+
#include "private/pkg.h"

const char *
pkg_object_dump(pkg_object *o)
@@ -106,5 +107,5 @@ pkg_object_int(pkg_object *o)
unsigned
pkg_object_count(pkg_object *o)
{
-
	return (o->len);
+
	return (UCL_COUNT(o));
}