[MMSYS]: Improve AddSoundProfile, by Victor Martinez Calvo (with 1 minor modification...
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 25 Jul 2016 20:24:30 +0000 (20:24 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 25 Jul 2016 20:24:30 +0000 (20:24 +0000)
commitb79e7d2eee7ccb336d1275cab89730e0eb0b60ed
treef7c289e20a6f80c24acd329ffee5834a7a5b428f
parent42abc25acc3c7e1f1daf6894669fe7aad672e293
[MMSYS]: Improve AddSoundProfile, by Victor Martinez Calvo (with 1 minor modification by myself):
◾ Don't return TRUE when CB_SETITEMDATA fails.
◾ Avoid pScheme NULL dereference if allocation fails. CID 1223154
◾ Avoid overflowing the destiny buffer by using StringCchCopy() CID 510953
and:
1) Make it more readable by returning as soon as possible when an error happens.
2) Make it more readable by reducing the nested ifs-checks.
3) Remove the added string in the combobox if the sound scheme buffer mem allocation fails (pt.3 modified).
CORE-11603 #resolve #comment Thanks!

svn path=/trunk/; revision=72000
reactos/dll/cpl/mmsys/sounds.c