diff options
author | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-29 18:39:51 +0000 |
---|---|---|
committer | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-29 18:39:51 +0000 |
commit | b65196079a077cc11b7c3881741f909a28f6db1b (patch) | |
tree | 2613d9510984ef18c255dc8f8e0835fe820469d5 /media | |
parent | a5f989c4b7887be720c4f2fb8c3b098e5f2aef31 (diff) | |
download | chromium_src-b65196079a077cc11b7c3881741f909a28f6db1b.zip chromium_src-b65196079a077cc11b7c3881741f909a28f6db1b.tar.gz chromium_src-b65196079a077cc11b7c3881741f909a28f6db1b.tar.bz2 |
[Coverity] Removed always-true if
WAVEINCAPS.szPname is an array, not a pointer --> always != NULL
CID=103610
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9873001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/audio/win/device_enumeration_win.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/media/audio/win/device_enumeration_win.cc b/media/audio/win/device_enumeration_win.cc index ddd8094..d226986 100644 --- a/media/audio/win/device_enumeration_win.cc +++ b/media/audio/win/device_enumeration_win.cc @@ -114,18 +114,16 @@ bool GetInputDeviceNamesWinXP(AudioDeviceNames* device_names) { if (err != MMSYSERR_NOERROR) continue; - if (capabilities.szPname != NULL) { - // Store the user-friendly name. Max length is MAXPNAMELEN(=32) - // characters and the name cane be truncated on XP. - // Example: "Microphone (Realtek High Defini". - device.device_name = WideToUTF8(capabilities.szPname); + // Store the user-friendly name. Max length is MAXPNAMELEN(=32) + // characters and the name cane be truncated on XP. + // Example: "Microphone (Realtek High Defini". + device.device_name = WideToUTF8(capabilities.szPname); - // Store the "unique" name (we use same as friendly name on Windows XP). - device.unique_id = WideToUTF8(capabilities.szPname); + // Store the "unique" name (we use same as friendly name on Windows XP). + device.unique_id = WideToUTF8(capabilities.szPname); - // Add combination of user-friendly and unique name to the output list. - device_names->push_back(device); - } + // Add combination of user-friendly and unique name to the output list. + device_names->push_back(device); } return true; |