{
int offset;
const uschar *error;
- stripchart_regex[indx] = pcre_compile(CS buffer, PCRE_COPT,
- (const char **)&error, &offset, NULL);
- if (stripchart_regex[indx] == NULL)
+ if (!(stripchart_regex[indx] = pcre_compile(CS buffer, PCRE_COPT,
+ CCSS &error, &offset, NULL)))
{
printf("regular expression error: %s at offset %d "
"while compiling %s\n", error, offset, buffer);
/* Compile the regex for matching yyyy-mm-dd at the start of a string. */
yyyymmdd_regex = pcre_compile("^\\d{4}-\\d\\d-\\d\\d\\s", PCRE_COPT,
- (const char **)&error, &erroroffset, NULL);
+ CCSS &error, &erroroffset, NULL);
}
/* End of em_init.c */
DEBUG(D_auth)
debug_printf("Running pwcheck authentication for user \"%s\"\n", s);
-switch (pwcheck_verify_password(CS s, CS pw, (const char **)(&reply)))
+switch (pwcheck_verify_password(CS s, CS pw, CCSS &reply))
{
case PWCHECK_OK:
DEBUG(D_auth) debug_printf("pwcheck: success (%s)\n", reply);
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s authenticator: "
"couldn't initialise Cyrus SASL server connection.", ablock->name);
-if ((rc = sasl_listmech(conn, NULL, "", ":", "", (const char **)&list, &len, &i)) != SASL_OK)
+if ((rc = sasl_listmech(conn, NULL, "", ":", "", CCSS &list, &len, &i)) != SASL_OK)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s authenticator: "
"couldn't get Cyrus SASL mechanism list.", ablock->name);
{
firsttime = 0;
HDEBUG(D_auth) debug_printf("Calling sasl_server_start(%s,\"%s\")\n", ob->server_mech, debug);
- rc = sasl_server_start(conn, CS ob->server_mech, inlen?CS input:NULL, inlen,
- (const char **)(&output), &outlen);
+ rc = sasl_server_start(conn, CS ob->server_mech, inlen ? CS input : NULL, inlen,
+ CCSS &output, &outlen);
}
else
{
}
HDEBUG(D_auth) debug_printf("Calling sasl_server_step(\"%s\")\n", debug);
- rc = sasl_server_step(conn, CS input, inlen, (const char **)(&output), &outlen);
+ rc = sasl_server_step(conn, CS input, inlen, CCSS &output, &outlen);
}
if (rc == SASL_BADPROT)
pcre_free = function_store_free;
}
if (caseless) options |= PCRE_CASELESS;
-yield = pcre_compile(CCS pattern, options, (const char **)&error, &offset, NULL);
+yield = pcre_compile(CCS pattern, options, CCSS &error, &offset, NULL);
pcre_malloc = function_store_get;
pcre_free = function_dummy_free;
if (yield == NULL)
break;
case ECOND_MATCH: /* Regular expression match */
- if (!(re = pcre_compile(CS sub[1], PCRE_COPT, (const char **)&rerror,
+ if (!(re = pcre_compile(CS sub[1], PCRE_COPT, CCSS &rerror,
&roffset, NULL)))
{
expand_string_message = string_sprintf("regular expression error in "
/* Compile the regular expression */
- if (!(re = pcre_compile(CS sub[1], PCRE_COPT, (const char **)&rerror,
+ if (!(re = pcre_compile(CS sub[1], PCRE_COPT, CCSS &rerror,
&roffset, NULL)))
{
expand_string_message = string_sprintf("regular expression error in "
debug_printf_indent(" Pattern = %s\n", exp[1]);
}
- re = pcre_compile(CS exp[1],
+ if (!(re = pcre_compile(CS exp[1],
PCRE_COPT | ((c->type == cond_matches)? PCRE_CASELESS : 0),
- (const char **)®comp_error, ®comp_error_offset, NULL);
-
- if (re == NULL)
+ CCSS ®comp_error, ®comp_error_offset, NULL)))
{
*error_pointer = string_sprintf("error while compiling "
"regular expression \"%s\": %s at offset %d",
/* Run the command. We use the argv form rather than plain as that parses
into args by whitespace yet has no escaping mechanism. */
- redis_reply = redisCommandArgv(redis_handle, i, (const char **) argv, NULL);
- if (!redis_reply)
+ if (!(redis_reply = redisCommandArgv(redis_handle, i, CCSS argv, NULL)))
{
*errmsg = string_sprintf("REDIS: query failed: %s\n", redis_handle->errstr);
*defer_break = FALSE;
int roffset;
const pcre * cre;
-cre = pcre_compile(CS re, PCRE_COPT, (const char **)&rerror, &roffset, NULL);
-if (!cre)
+if (!(cre = pcre_compile(CS re, PCRE_COPT, CCSS &rerror, &roffset, NULL)))
*errstr= string_sprintf("regular expression error in '%s': %s at offset %d",
re, rerror, roffset);
return cre;
ovector, nelem(ovector));
uschar * substr = NULL;
if (i >= 2) /* Got it */
- pcre_get_substring(CS text, ovector, i, 1, (const char **) &substr);
+ pcre_get_substring(CS text, ovector, i, 1, CCSS &substr);
return substr;
}
#define CUS (const unsigned char *)
#define USS (unsigned char **)
#define CUSS (const unsigned char **)
+#define CCSS (const char **)
/* The C library string functions expect "char *" arguments. Use macros to
avoid having to write a cast each time. We do this for string and file
const char ** dd;
int * ddl;
- for(nrec = 0; state->dane_data_len[nrec]; ) nrec++;
+ for (nrec = 0; state->dane_data_len[nrec]; ) nrec++;
nrec++;
dd = store_get(nrec * sizeof(uschar *), FALSE);
{
int check_path_len = Ustrlen(check_path);
- dir_regex = pcre_compile(CS ob->maildir_dir_regex, PCRE_COPT,
- (const char **)&error, &offset, NULL);
- if (dir_regex == NULL)
+ if (!(dir_regex = pcre_compile(CS ob->maildir_dir_regex, PCRE_COPT,
+ CCSS &error, &offset, NULL)))
{
addr->message = string_sprintf("appendfile: regular expression "
"error: %s at offset %d while compiling %s", error, offset,
DEBUG(D_transport) debug_printf("checking for maildirfolder requirement\n");
- regex = pcre_compile(CS maildirfolder_create_regex, PCRE_COPT,
- (const char **)&error, &offset, NULL);
-
- if (regex == NULL)
+ if (!(regex = pcre_compile(CS maildirfolder_create_regex, PCRE_COPT,
+ CCSS &error, &offset, NULL)))
{
addr->message = string_sprintf("appendfile: regular expression "
"error: %s at offset %d while compiling %s", error, offset,