[Kamailio-Devel] Why "lcr" module returns "(pcre *)0" ?

Iñaki Baz Castillo ibc at aliax.net
Thu Jan 8 00:26:43 CET 2009


Hi, which is the purpose of this return code in "lcr" module?:


  rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size);
  if (rc != 0) {
    LM_ERR("pcre_fullinfo on compiled pattern '%s' yielded error: %d\n",
            pattern, rc);
    return (pcre *)0;
  }


I've tested it and the returned integer is always 0, so "success"?
Perhaps is not required by the father function to return error when a PCRE 
compilation issue occurs, but why "return (pcre *)0;" instead of just "return 
0;" ?

Thanks.

-- 
Iñaki Baz Castillo



More information about the Devel mailing list