tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48 Reviewed-on: https://gerrit.libreoffice.org/70017 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -217,6 +218,7 @@ Token *
|
||||
|
||||
trp->max = 3 * trp->max / 2 + 1;
|
||||
trp->bp = (Token *) realloc(trp->bp, trp->max * sizeof(Token));
|
||||
assert(trp->bp); // realloc failure is OOM -> no point to handle
|
||||
trp->lp = &trp->bp[nlast];
|
||||
trp->tp = &trp->bp[ncur];
|
||||
return trp->lp;
|
||||
|
||||
Reference in New Issue
Block a user