Commit 8e8fd7f1 authored by J. Alexander Treuman's avatar J. Alexander Treuman

Use memcmp to compare audio formats

git-svn-id: https://svn.musicpd.org/mpd/trunk@4585 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent ff0a2543
......@@ -84,8 +84,7 @@ void copyAudioFormat(AudioFormat * dest, AudioFormat * src)
int cmpAudioFormat(AudioFormat * f1, AudioFormat * f2)
{
if (f1 && f2 && (f1->sampleRate == f2->sampleRate) &&
(f1->bits == f2->bits) && (f1->channels == f2->channels))
if (f1 && f2 && (0 == memcmp(f1, f2, sizeof(AudioFormat))))
return 0;
return 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment