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:
Mike Kaganski
2019-04-01 00:49:12 +02:00
parent 1d35b89e75
commit 85456fae54
21 changed files with 55 additions and 43 deletions
+2
View File
@@ -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;