Re: function pointer is not initializing to NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



static int (*retrivalFunc)(char *attr, char *option, returnCode *codePtr,
char *buf) = NULL;

sampleFunc() {

if (attRetrivalfunc != NULL) {
return(retrivalFunc(attName, dataBuf,codePtr, msg));
}
}

Look closely: you're not testing for retrivalFunc == NULL at all.


Segher


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux