]> git.tue.mpg.de Git - paraslash.git/commitdiff
ogg_afh_common.c: Remove pointless variable.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 25 Dec 2016 23:55:02 +0000 (00:55 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 22 Jan 2017 08:59:20 +0000 (09:59 +0100)
The "len" variable is initialized once and never changes.

ogg_afh_common.c

index adab7f481fbb0e7873c1d1e1ac4968834bd81fe3..6e5a89347e383340f943e591254f64f05cc6f358 100644 (file)
@@ -127,19 +127,18 @@ int ogg_get_file_info(char *map, size_t numbytes, struct afh_info *afhi,
 {
        ogg_sync_state oss;
        ogg_page op;
-       long len = numbytes;
        char *buf;
        int ret, i, j, frames_per_chunk, ct_size;
        long long unsigned num_frames = 0;
 
        ogg_sync_init(&oss);
        ret = -E_OGG_SYNC;
-       buf = ogg_sync_buffer(&oss, len);
+       buf = ogg_sync_buffer(&oss, numbytes);
        if (!buf)
                goto out;
-       memcpy(buf, map, len);
+       memcpy(buf, map, numbytes);
        ret = -E_OGG_SYNC;
-       if (ogg_sync_wrote(&oss, len) < 0)
+       if (ogg_sync_wrote(&oss, numbytes) < 0)
                goto out;
        ret = process_ogg_packets(&oss, afhi, ci);
        if (ret < 0)