commit 2507ffb7f18f4e8d71f47efc0cc1e746177e9167 from: Stefan Sperling date: Mon Jan 02 12:25:10 2023 UTC log_warnx and fatalx prepend the program name internally, don't add it manually commit - 3b70620381319263c9c5e4d4ddbc07118aa5fb87 commit + 2507ffb7f18f4e8d71f47efc0cc1e746177e9167 blob - 31152bd34eaf810e24f6a49f1151c8b3927bec5c blob + eb5822c199bae7d3a0ab0b75eefe7854b6409e3c --- gotd/parse.y +++ gotd/parse.y @@ -665,8 +665,8 @@ parse_config(const char *filename, enum gotd_procid pr TAILQ_FOREACH(repo, &gotd->repos, entry) { if (repo->path[0] == '\0') { - log_warnx("%s: repository \"%s\": no path provided in " - "configuration file", getprogname(), repo->name); + log_warnx("repository \"%s\": no path provided in " + "configuration file", repo->name); return (-1); } } @@ -684,10 +684,8 @@ conf_new_repo(const char *name) file->name); } - if (strchr(name, '\n') != NULL) { - fatalx("%s: repository names must not contain linefeeds: %s", - getprogname(), name); - } + if (strchr(name, '\n') != NULL) + fatalx("repository names must not contain linefeeds: %s", name); repo = calloc(1, sizeof(*repo)); if (repo == NULL)