commit 0cbf8de725393d7866ab0e146671a1611644afc6 from: Stefan Sperling via: Thomas Adam date: Mon Jan 02 15:03:00 2023 UTC log_warnx and fatalx prepend the program name internally, don't add it manually commit - 88f1bb6ddf803e7ceb1f2f7a72253a46d12ae6c6 commit + 0cbf8de725393d7866ab0e146671a1611644afc6 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)