Addressed review comments

This commit is contained in:
Leonard Hecker 2019-01-14 21:54:50 +01:00
parent 3dd4ddddc8
commit ab6126d55d
1 changed files with 7 additions and 1 deletions

View File

@ -1666,7 +1666,13 @@ vips_image_temp_name( char *name, int size )
{
static int global_serial = 0;
int serial = g_atomic_int_add( &global_serial, 1);
int serial =
#if GLIB_CHECK_VERSION( 2, 30, 0 )
g_atomic_int_add( &global_serial, 1);
#else
g_atomic_exchange_and_add( &global_serial, 1);
#endif
vips_snprintf( name, size, "temp-%d", serial );
}