]> gitweb.hhaalo.de Git - discspan.git/commitdiff
inline splitter
authorBastian Dehn <hhaalo@arcor.de>
Sun, 31 Aug 2025 09:46:18 +0000 (11:46 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 31 Aug 2025 09:46:18 +0000 (11:46 +0200)
libs/spandisc/src/splitter.c

index 603a603b1a66b64df4cb9bc9f9f4392748cfa52a..8880249a8d79aee0edfe3e3742e655dc8220f97e 100644 (file)
@@ -134,12 +134,10 @@ void split_all(medium_t *srcdata, collection_t* col)
                ignoredisc = NULL;
        }
 
-       medium_t* disc = NULL;
        while (srcdata->length > 0) {
                srcdata->nr++;
-               disc = splitter(srcdata);
                col->disc = realloc(col->disc, (col->length + 1) * sizeof(medium_t*));
-               col->disc[col->length] = disc;
+               col->disc[col->length] = splitter(srcdata);
                col->length++;
        }
 }