core: use OSTREE_OBJECT_TYPE_LAST instead of OSTREE_OBJECT_TYPE_COMMIT

OSTREE_OBJECT_TYPE_LAST holds the value of the last element in the enum.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2015-10-28 09:39:46 +01:00
parent 7bf138b036
commit 048c27588a

View File

@ -1082,7 +1082,7 @@ ostree_object_name_serialize (const char *checksum,
OstreeObjectType objtype)
{
g_assert (objtype >= OSTREE_OBJECT_TYPE_FILE
&& objtype <= OSTREE_OBJECT_TYPE_COMMIT);
&& objtype <= OSTREE_OBJECT_TYPE_LAST);
return g_variant_new ("(su)", checksum, (guint32)objtype);
}