ref: 0e890082e23656546a1842dde73106cd92bcba47
parent: d6a2e29028850459d3960edc6d2d187c571c66ca
parent: b373301e1fa1ac229a08858442f3621cc7022feb
author: James Zern <[email protected]>
date: Thu Mar 19 11:43:40 EDT 2015
Merge "external_frame_buffer_test: quiet static analysis warnings"
--- a/test/external_frame_buffer_test.cc
+++ b/test/external_frame_buffer_test.cc
@@ -97,13 +97,19 @@
return 0;
}
- // Marks the external frame buffer that |fb| is pointing too as free.
+ // Marks the external frame buffer that |fb| is pointing to as free.
// Returns < 0 on an error.
int ReturnFrameBuffer(vpx_codec_frame_buffer_t *fb) {
- EXPECT_TRUE(fb != NULL);
+ if (fb == NULL) {
+ EXPECT_TRUE(fb != NULL);
+ return -1;
+ }
ExternalFrameBuffer *const ext_fb =
reinterpret_cast<ExternalFrameBuffer*>(fb->priv);
- EXPECT_TRUE(ext_fb != NULL);
+ if (ext_fb == NULL) {
+ EXPECT_TRUE(ext_fb != NULL);
+ return -1;
+ }
EXPECT_EQ(1, ext_fb->in_use);
ext_fb->in_use = 0;
return 0;