core: use OSTREE_OBJECT_TYPE_LAST instead of OSTREE_OBJECT_TYPE_COMMIT
authorGiuseppe Scrivano <gscrivan@redhat.com>
Wed, 28 Oct 2015 08:39:46 +0000 (09:39 +0100)
committerGiuseppe Scrivano <gscrivan@redhat.com>
Tue, 3 Nov 2015 08:53:38 +0000 (09:53 +0100)
OSTREE_OBJECT_TYPE_LAST holds the value of the last element in the enum.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
src/libostree/ostree-core.c

index a3d13e56cdb02a57ee15821c1c1ae4fbfab090ec..8fe9d765e5221fe149c4591ffac43eac966f2956 100644 (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);
 }