PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ if() [3/9]

if ( nEntitySize  ,
(int32) psSHP->  nBufSize 
)

Definition at line 1580 of file shpopen.c.

1581 {
1582 psSHP->pabyRec = (uchar *) SfRealloc(psSHP->pabyRec,nEntitySize);
1583 if (psSHP->pabyRec == NULL)
1584 {
1585 char szError[200];
1586
1587 /* Reallocate previous successfull size for following features */
1588 psSHP->pabyRec = malloc(psSHP->nBufSize);
1589
1590 sprintf( szError,
1591 "Not enough memory to allocate requested memory (nBufSize=%d). "
1592 "Probably broken SHP file", psSHP->nBufSize );
1593 psSHP->sHooks.Error( szError );
1594 return NULL;
1595 }
1596
1597 /* Only set new buffer size after successfull alloc */
1598 psSHP->nBufSize = nEntitySize;
1599 }
void * malloc(YYSIZE_T)
static void * SfRealloc(void *pMem, int nNewSize)
Definition shpopen.c:323
nEntitySize
Definition shpopen.c:1579
unsigned char uchar
Definition shpopen.c:268

References malloc(), nEntitySize, and SfRealloc().

Here is the call graph for this function: