From c3deaa30d51dc6336365f0fee3843419fa8616f9 Mon Sep 17 00:00:00 2001 From: Bjorn Volcker Date: Thu, 28 May 2015 14:30:22 +0200 Subject: [PATCH] common_audio/vad: Removes head allocation failure check Related to https://webrtc-codereview.appspot.com/51919004/ where Create() was changed. This CL removes a useless malloc failure check. BUG=441, 3347 R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/51109004 Cr-Commit-Position: refs/heads/master@{#9312} --- webrtc/common_audio/vad/include/webrtc_vad.h | 1 - webrtc/common_audio/vad/webrtc_vad.c | 3 --- 2 files changed, 4 deletions(-) diff --git a/webrtc/common_audio/vad/include/webrtc_vad.h b/webrtc/common_audio/vad/include/webrtc_vad.h index 896493e04..51f7b8d10 100644 --- a/webrtc/common_audio/vad/include/webrtc_vad.h +++ b/webrtc/common_audio/vad/include/webrtc_vad.h @@ -25,7 +25,6 @@ extern "C" { #endif // Creates an instance to the VAD structure. -// Returns a null pointer if create was unsuccessful. VadInst* WebRtcVad_Create(); // Frees the dynamic memory of a specified VAD instance. diff --git a/webrtc/common_audio/vad/webrtc_vad.c b/webrtc/common_audio/vad/webrtc_vad.c index fcf03f805..5af1b5bb0 100644 --- a/webrtc/common_audio/vad/webrtc_vad.c +++ b/webrtc/common_audio/vad/webrtc_vad.c @@ -24,9 +24,6 @@ static const int kMaxFrameLengthMs = 30; VadInst* WebRtcVad_Create() { VadInstT* self = (VadInstT*)malloc(sizeof(VadInstT)); - if (self == NULL) { - return NULL; - } WebRtcSpl_Init(); self->init_flag = 0;