Project

General

Profile

Feature #2094 ยป 0032-mpcli.c-Replace-NULL-with-nullptr.patch

Marko Lindqvist, 07/28/2026 12:08 AM

View differences:

tools/fcmp/mpcli.c
struct fcmp_params fcmp = {
.list_url = MODPACK_LIST_URL,
.inst_prefix = NULL,
.autoinstall = NULL
.inst_prefix = nullptr,
.autoinstall = nullptr
};
/**********************************************************************//**
......
type_str = _("?");
}
if (license != NULL) {
if (license != nullptr) {
lic_str = license;
} else {
/* TRANS: License of modpack is not known */
......
}
inst_str = mpdb_installed_version(name, type);
if (inst_str == NULL) {
if (inst_str == nullptr) {
inst_str = _("Not installed");
}
......
log_normal(_("Type=\"%s\" / \"%s\""), type_str, subtype);
log_normal(_("License=\"%s\""), lic_str);
log_normal(_("URL=\"%s\""), URL);
if (notes != NULL) {
if (notes != nullptr) {
log_normal(_("Comment=\"%s\""), notes);
}
}
......
log_normal("%s%s", word_version(), VERSION_STRING);
rev_ver = fc_git_revision();
if (rev_ver != NULL) {
if (rev_ver != nullptr) {
log_normal(_("commit: %s"), rev_ver);
}
log_normal("%s", "");
if (fcmp.autoinstall == NULL) {
if (fcmp.autoinstall == nullptr) {
download_modpack_list(&fcmp, setup_modpack_list, msg_callback);
log_normal("%s", "");
......
} else {
const char *errmsg;
errmsg = download_modpack(fcmp.autoinstall, &fcmp, msg_callback, NULL);
errmsg = download_modpack(fcmp.autoinstall, &fcmp, msg_callback, nullptr);
if (errmsg == NULL) {
if (errmsg == nullptr) {
log_normal(_("Modpack installed successfully"));
} else {
log_error(_("Modpack install failed: %s"), errmsg);
    (1-1/1)