summary refs log tree commit diff stats
path: root/audio/audio.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2018-06-25 14:10:56 -0300
committerEduardo Habkost <ehabkost@redhat.com>2018-06-25 14:10:56 -0300
commit0b6e9aa89e02c8b213af019aad816e00ba8243f8 (patch)
tree27eb6832830ebf44939c7b968df9044c6d4433ae /audio/audio.c
parent6b2942f966d5e54c37d305c80f5f98d504c2bc55 (diff)
parent35e238c9330669882487f9929e0aa97900431853 (diff)
downloadfocaccia-qemu-0b6e9aa89e02c8b213af019aad816e00ba8243f8.tar.gz
focaccia-qemu-0b6e9aa89e02c8b213af019aad816e00ba8243f8.zip
Merge branch 'master' of git://git.qemu.org/qemu into x86-next
Diffstat (limited to 'audio/audio.c')
-rw-r--r--audio/audio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/audio/audio.c b/audio/audio.c
index 6eccdb17ee..d6e91901aa 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -335,9 +335,8 @@ static int audio_get_conf_int (const char *key, int defval, int *defaultp)
     char *strval;
 
     strval = getenv (key);
-    if (strval) {
+    if (strval && !qemu_strtoi(strval, NULL, 10, &val)) {
         *defaultp = 0;
-        val = atoi (strval);
         return val;
     }
     else {