comparison src/exif.c @ 1367:fe4da037be21

When g_new0() is used, drop redundant initializations to NULL, FALSE or 0, second pass.
author zas_
date Sun, 01 Mar 2009 23:14:19 +0000
parents 2abdd6e50120
children 91bed0d66cf2
comparison
equal deleted inserted replaced
1366:ff3cd67235af 1367:fe4da037be21
509 item = g_new0(ExifItem, 1); 509 item = g_new0(ExifItem, 1);
510 item->format = format; 510 item->format = format;
511 item->tag = tag; 511 item->tag = tag;
512 item->marker = marker; 512 item->marker = marker;
513 item->elements = elements; 513 item->elements = elements;
514 item->data = NULL;
515 item->data_len = 0;
516 514
517 switch (format) 515 switch (format)
518 { 516 {
519 case EXIF_FORMAT_UNKNOWN: 517 case EXIF_FORMAT_UNKNOWN:
520 /* unknown, data is NULL */ 518 /* unknown, data is NULL */
1226 return NULL; 1224 return NULL;
1227 } 1225 }
1228 g_free(pathl); 1226 g_free(pathl);
1229 1227
1230 exif = g_new0(ExifData, 1); 1228 exif = g_new0(ExifData, 1);
1231 exif->items = NULL;
1232 exif->current = NULL;
1233 exif->path = g_strdup(path); 1229 exif->path = g_strdup(path);
1234 1230
1235 res = exif_jpeg_parse(exif, (guchar *)f, size, ExifKnownMarkersList); 1231 res = exif_jpeg_parse(exif, (guchar *)f, size, ExifKnownMarkersList);
1236 if (res == -2) 1232 if (res == -2)
1237 { 1233 {