summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
96a2a03)
With a function prototype in place stating a parameter is a foo pointer,
where foo is data, not a function, then `NULL' suffices so the cast to
foo pointer is redundant. If the function parameter is retrieved with
va_arg(3) then the pointer passed must be the retrieved type, e.g.
concat()'s arguments are fetched as char pointer and so it should be
called as `concat("foo", (char *)0)'. Using NULL is incorrect, though
NULL could be used instead of 0 but still needs casting. However, the
source doesn't bother getting this right and just passes NULL in most
cases so make the few match. Most of those changed were passing NULL
cast to a void pointer.
- if (sm_wstream ((char *) NULL, 0) == NOTOK)
+ if (sm_wstream(NULL, 0) == NOTOK)
return RP_BHST;
switch (smtalk (SM_DOT + 3 * sm_addrs, ".")) {
return RP_BHST;
switch (smtalk (SM_DOT + 3 * sm_addrs, ".")) {
if (strcmp (name, ".") == 0) {
prefix = mh_xstrdup("");
} else {
if (strcmp (name, ".") == 0) {
prefix = mh_xstrdup("");
} else {
- prefix = concat (name, "/", (void *)NULL);
+ prefix = concat(name, "/", NULL);
}
while ((dp = readdir (dd))) {
}
while ((dp = readdir (dd))) {
if (!strcmp (dp->d_name, ".") || !strcmp (dp->d_name, "..")) {
continue;
}
if (!strcmp (dp->d_name, ".") || !strcmp (dp->d_name, "..")) {
continue;
}
- child = concat (prefix, dp->d_name, (void *)NULL);
+ child = concat(prefix, dp->d_name, NULL);
/* If we have no d_type or d_type is DT_LNK or DT_UNKNOWN, stat the
* child to see what it is. */
if (child_is_folder == -1) {
/* If we have no d_type or d_type is DT_LNK or DT_UNKNOWN, stat the
* child to see what it is. */
if (child_is_folder == -1) {
#define yyterminate() (void)yy_delete_buffer(lexhandle); \
if(!(tw.tw_flags & TW_SUCC)) { \
#define yyterminate() (void)yy_delete_buffer(lexhandle); \
if(!(tw.tw_flags & TW_SUCC)) { \
- return (struct tws *)NULL; \
} \
if(tw.tw_year < 1970) \
tw.tw_year += 1900; \
} \
if(tw.tw_year < 1970) \
tw.tw_year += 1900; \
{
char *cp = sp;
struct format *fexpr,
{
char *cp = sp;
struct format *fexpr,
- *fif = (struct format *)NULL;
fif = fp; /* loc of GOTO */
fexpr->f_skip = next_fp - fexpr;
fif = fp; /* loc of GOTO */
fexpr->f_skip = next_fp - fexpr;
- fexpr = (struct format *)NULL;/* no extra ENDIF */
+ fexpr = NULL; /* no extra ENDIF */
cp = compile (cp); /* compile ELSE stmts */
fif->f_skip = next_fp - fif;
cp = compile (cp); /* compile ELSE stmts */
fif->f_skip = next_fp - fif;
if (curl_ctx->res_len > 0
&& is_json(curl_ctx->content_type)
&& get_json_strings(curl_ctx->res_body, curl_ctx->res_len, ctx->log,
if (curl_ctx->res_len > 0
&& is_json(curl_ctx->content_type)
&& get_json_strings(curl_ctx->res_body, curl_ctx->res_len, ctx->log,
- "error", &error, (void *)NULL)
&& error != NULL) {
if (strcmp(error, "invalid_grant") == 0) {
code = MH_OAUTH_BAD_GRANT;
&& error != NULL) {
if (strcmp(error, "invalid_grant") == 0) {
code = MH_OAUTH_BAD_GRANT;
"client_id", ctx->svc.client_id,
"redirect_uri", ctx->svc.redirect_uri,
"scope", ctx->svc.scope,
"client_id", ctx->svc.client_id,
"redirect_uri", ctx->svc.redirect_uri,
"scope", ctx->svc.scope,
set_err(ctx, MH_OAUTH_REQUEST_INIT);
return NULL;
}
set_err(ctx, MH_OAUTH_REQUEST_INIT);
return NULL;
}
"access_token", &access_token,
"expires_in", &expires_in,
"refresh_token", &refresh_token,
"access_token", &access_token,
"expires_in", &expires_in,
"refresh_token", &refresh_token,
"redirect_uri", ctx->svc.redirect_uri,
"client_id", ctx->svc.client_id,
"client_secret", ctx->svc.client_secret,
"redirect_uri", ctx->svc.redirect_uri,
"client_id", ctx->svc.client_id,
"client_secret", ctx->svc.client_secret,
set_err(ctx, MH_OAUTH_REQUEST_INIT);
return NULL;
}
set_err(ctx, MH_OAUTH_REQUEST_INIT);
return NULL;
}
"refresh_token", cred->refresh_token,
"client_id", ctx->svc.client_id,
"client_secret", ctx->svc.client_secret,
"refresh_token", cred->refresh_token,
"client_id", ctx->svc.client_id,
"client_secret", ctx->svc.client_secret,
set_err(ctx, MH_OAUTH_REQUEST_INIT);
return false;
}
set_err(ctx, MH_OAUTH_REQUEST_INIT);
return false;
}
- matches = (char **) NULL;
if (start == 0)
matches = rl_completion_matches(text, nmh_command_generator);
if (start == 0)
matches = rl_completion_matches(text, nmh_command_generator);
return NULL;
/* get filename of sequence file */
return NULL;
/* get filename of sequence file */
- seqfile = concat(m_maildir(folder), "/", mh_seq, (void *)NULL);
+ seqfile = concat(m_maildir(folder), "/", mh_seq, NULL);
if (seqfile == NULL)
return NULL;
if (seqfile == NULL)
return NULL;
} else {
old_msgnums = msgnums;
msgnums = concat(old_msgnums, " ",
} else {
old_msgnums = msgnums;
msgnums = concat(old_msgnums, " ",
- this_msgnums, (void *)NULL);
free(old_msgnums);
free(this_msgnums);
}
free(old_msgnums);
free(this_msgnums);
}
} else {
old_msgnums = msgnums;
msgnums = concat(old_msgnums, " ",
} else {
old_msgnums = msgnums;
msgnums = concat(old_msgnums, " ",
- this_msgnums, (void *)NULL);
free(old_msgnums);
free(this_msgnums);
}
free(old_msgnums);
free(this_msgnums);
}
/* TODO: Split enough of scan.c out so that we can call it here. */
command = concat("scan +", node->n_name, " ", sequences_s,
/* TODO: Split enough of scan.c out so that we can call it here. */
command = concat("scan +", node->n_name, " ", sequences_s,
status = system(command);
if (! WIFEXITED (status)) {
adios (command, "system");
status = system(command);
if (! WIFEXITED (status)) {
adios (command, "system");