minor formatting
[flac.git] / src / test_libFLAC / metadata_manip.c
index 1445707..159205b 100644 (file)
@@ -1,5 +1,5 @@
 /* test_libFLAC - Unit tester for libFLAC
- * Copyright (C) 2002  Josh Coalson
+ * Copyright (C) 2002,2003  Josh Coalson
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -177,7 +177,7 @@ static FLAC__bool compare_chain_(FLAC__Metadata_Chain *chain, unsigned current_p
                        return die_("getting block from iterator");
                }
 
-               if(!compare_block_(our_metadata_.blocks[i], block)) {
+               if(!mutils__compare_block(our_metadata_.blocks[i], block)) {
                        FLAC__metadata_iterator_delete(iterator);
                        return die_("metadata block mismatch");
                }
@@ -198,7 +198,7 @@ static FLAC__bool compare_chain_(FLAC__Metadata_Chain *chain, unsigned current_p
                printf("CURRENT_POSITION... ");
                fflush(stdout);
 
-               if(!compare_block_(our_metadata_.blocks[current_position], current_block))
+               if(!mutils__compare_block(our_metadata_.blocks[current_position], current_block))
                        return die_("metadata block mismatch");
        }
 
@@ -254,7 +254,7 @@ static void decoder_metadata_callback_compare_(const FLAC__FileDecoder *decoder,
                dcd->error_occurred = true;
        }
        else {
-               if(!compare_block_(our_metadata_.blocks[mc_our_block_number_], metadata)) {
+               if(!mutils__compare_block(our_metadata_.blocks[mc_our_block_number_], metadata)) {
                        (void)die_("metadata block mismatch");
                        dcd->error_occurred = true;
                }
@@ -434,6 +434,9 @@ static FLAC__bool test_level_1_()
        FLAC__byte data[1000];
        unsigned our_current_position = 0;
 
+       /* initialize 'data' to avoid Valgrind errors */
+       memset(data, 0, sizeof(data));
+
        printf("\n\n++++++ testing level 1 interface\n");
 
        /************************************************************/
@@ -1092,6 +1095,9 @@ static FLAC__bool test_level_2_()
        FLAC__byte data[2000];
        unsigned our_current_position;
 
+       /* initialize 'data' to avoid Valgrind errors */
+       memset(data, 0, sizeof(data));
+
        printf("\n\n++++++ testing level 2 interface\n");
 
        printf("generate read-only file\n");