summaryrefslogtreecommitdiff
path: root/camlibs/sq905
diff options
context:
space:
mode:
Diffstat (limited to 'camlibs/sq905')
-rw-r--r--camlibs/sq905/sq905.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/camlibs/sq905/sq905.c b/camlibs/sq905/sq905.c
index 53f7c013c..c72add5ec 100644
--- a/camlibs/sq905/sq905.c
+++ b/camlibs/sq905/sq905.c
@@ -91,10 +91,12 @@ sq_init (GPPort *port, CameraPrivateLibrary *priv)
/* The first occurence of a zero denotes end of files entries (here clips count as 1 entry) */
for (i=0; i<0x4000 && catalog[i]; i+=16) ;
priv->nb_entries = i>>4;
- catalog_tmp = realloc(catalog, i);
if (i) {
- if (catalog_tmp) priv->catalog = catalog_tmp;
- else priv->catalog = catalog;
+ catalog_tmp = realloc(catalog, i);
+ if (catalog_tmp)
+ priv->catalog = catalog_tmp;
+ else
+ priv->catalog = catalog;
} else {
priv->catalog = NULL; /* We just have freed catalog_tmp */
}