changeset 25463:2a0982bac1b0

Combine code for check availability of property audio(id).
author ulion
date Sat, 22 Dec 2007 06:27:55 +0000
parents 3e033aabc9d2
children 6f45e8b913cf
files command.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/command.c	Sat Dec 22 06:20:48 2007 +0000
+++ b/command.c	Sat Dec 22 06:27:55 2007 +0000
@@ -731,17 +731,16 @@
 {
     int current_id = -1, tmp;
 
+    if (!mpctx->sh_audio)
+	return M_PROPERTY_UNAVAILABLE;
+
     switch (action) {
     case M_PROPERTY_GET:
-	if (!mpctx->sh_audio)
-	    return M_PROPERTY_UNAVAILABLE;
 	if (!arg)
 	    return M_PROPERTY_ERROR;
 	*(int *) arg = audio_id;
 	return M_PROPERTY_OK;
     case M_PROPERTY_PRINT:
-	if (!mpctx->sh_audio)
-	    return M_PROPERTY_UNAVAILABLE;
 	if (!arg)
 	    return M_PROPERTY_ERROR;