MCPcopy Index your code
hub / github.com/MapServer/MapServer / msCheckParentPointer

Function msCheckParentPointer

maputil.c:2005–2023  ·  view source on GitHub ↗

RFC 24: check if the parent pointer is NULL and raise an error otherwise */

Source from the content-addressed store, hash-verified

2003 RFC 24: check if the parent pointer is NULL and raise an error otherwise
2004*/
2005int msCheckParentPointer(void* p, char *objname) {
2006 char* fmt="The %s parent object is null";
2007 char* msg=NULL;
2008 if (p == NULL) {
2009 if(objname != NULL) {
2010 msg=malloc( sizeof(char) * ( ( strlen(fmt)+strlen(objname) ) ) );
2011 if(msg == NULL) {
2012 msg="A required parent object is null";
2013 } else {
2014 sprintf(msg, "The %s parent object is null", objname);
2015 }
2016 } else {
2017 msg="A required parent object is null";
2018 }
2019 msSetError(MS_NULLPARENTERR, msg, "");
2020 return MS_FAILURE;
2021 }
2022 return MS_SUCCESS;
2023}
2024
2025void msBufferInit(bufferObj *buffer) {
2026 buffer->data=NULL;

Callers 15

msSLDGenerateLineSLDFunction · 0.85
_AdjustLabelPositionFunction · 0.85
msTiledSHPOpenFileFunction · 0.85
msTiledSHPWhichShapesFunction · 0.85
msTiledSHPNextShapeFunction · 0.85
msTiledSHPGetShapeFunction · 0.85
msTiledSHPCloseFunction · 0.85
msSHPLayerOpenFunction · 0.85
msRasterQueryByRectFunction · 0.85

Calls 1

msSetErrorFunction · 0.85

Tested by

no test coverage detected