use G_N_ELEMENTS().

2002-12-20  Michael Natterer  <mitch@gimp.org>

	* app/xcf/xcf.c: use G_N_ELEMENTS().
This commit is contained in:
Michael Natterer 2002-12-20 12:56:11 +00:00 committed by Michael Natterer
parent f9213619b8
commit 12ad71944b
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2002-12-20 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf.c: use G_N_ELEMENTS().
2002-12-20 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.c (gimp_config_serialize): check the return

View File

@ -160,7 +160,6 @@ static GimpXcfLoaderFunc *xcf_loaders[] =
xcf_load_image, /* version 1 */
xcf_load_image /* version 2 */
};
static gint n_xcf_loaders = sizeof (xcf_loaders) / sizeof (xcf_loaders[0]);
void
@ -250,7 +249,7 @@ xcf_load_invoker (Gimp *gimp,
if (success)
{
if (info.file_version < n_xcf_loaders)
if (info.file_version < G_N_ELEMENTS (xcf_loaders))
{
gimage = (*(xcf_loaders[info.file_version])) (gimp, &info);