alloc.c (adaba9f34040c696f6e8e6f1096f218bf6ceb78e) | alloc.c (c1ab6cc1beb14b16b46e74a3723644016d8c3cc7) |
---|---|
1/****************************************************************************** 2 * 3 * Copyright (C) 2014 The Android Open Source Project 4 * Copyright 2003 - 2004 Open Interface North America, Inc. All rights reserved. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: --- 21 unchanged lines hidden (view full) --- 30 OI_UINT8 maxChannels, 31 OI_UINT8 pcmStride) 32{ 33 int i; 34 size_t filterBufferCount; 35 size_t subdataSize; 36 OI_BYTE *codecData = (OI_BYTE*)codecDataAligned; 37 | 1/****************************************************************************** 2 * 3 * Copyright (C) 2014 The Android Open Source Project 4 * Copyright 2003 - 2004 Open Interface North America, Inc. All rights reserved. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: --- 21 unchanged lines hidden (view full) --- 30 OI_UINT8 maxChannels, 31 OI_UINT8 pcmStride) 32{ 33 int i; 34 size_t filterBufferCount; 35 size_t subdataSize; 36 OI_BYTE *codecData = (OI_BYTE*)codecDataAligned; 37 |
38 if (maxChannels < 1 || maxChannels > 2) { | 38 if ((maxChannels < 1) || (maxChannels > 2)) { |
39 return OI_STATUS_INVALID_PARAMETERS; 40 } 41 | 39 return OI_STATUS_INVALID_PARAMETERS; 40 } 41 |
42 if (pcmStride < 1 || pcmStride > maxChannels) { | 42 if ((pcmStride < 1) || (pcmStride > maxChannels)) { |
43 return OI_STATUS_INVALID_PARAMETERS; 44 } 45 46 common->maxChannels = maxChannels; 47 common->pcmStride = pcmStride; 48 49 /* Compute sizes needed for the memory regions, and bail if we don't have 50 * enough memory for them. */ --- 28 unchanged lines hidden --- | 43 return OI_STATUS_INVALID_PARAMETERS; 44 } 45 46 common->maxChannels = maxChannels; 47 common->pcmStride = pcmStride; 48 49 /* Compute sizes needed for the memory regions, and bail if we don't have 50 * enough memory for them. */ --- 28 unchanged lines hidden --- |