if (log != NULL) mh_oauth_log_to(stderr, ctx);
- fn = getcpy(mh_oauth_cred_fn(svc));
+ fn = mh_xstrdup(mh_oauth_cred_fn(svc));
fp = lkfopendata(fn, "r+", &failed_to_lock);
if (fp == NULL) {
if (errno == ENOENT) {
free(fn);
/* XXX writeBase64raw modifies the source buffer! make a copy */
- client_res = getcpy(mh_oauth_sasl_client_response(oauth_res_len, user,
+ client_res = mh_xstrdup(mh_oauth_sasl_client_response(oauth_res_len, user,
cred));
mh_oauth_cred_free(cred);
mh_oauth_free(ctx);
base = "unknown error";
}
if (ctx->err_details == NULL) {
- return ctx->err_formatted = getcpy(base);
+ return ctx->err_formatted = mh_xstrdup(base);
}
ctx->err_formatted = concat(base, ": ", ctx->err_details, NULL);
}
fwrite(data, 1, size, fp);
if (data[size - 1] != '\n') {
- fputs("\n", fp);
+ putc('\n', fp);
}
fflush(fp);
return 0;