From: "Todd C. Miller" Subject: Re: Only use string literals as format strings for dprintf() To: Christian Weisgerber Cc: gameoftrees@openbsd.org Date: Thu, 10 Sep 2020 15:14:36 -0600 On Thu, 10 Sep 2020 23:04:20 +0200, Christian Weisgerber wrote: > Like this? asprintf(3) returns int, not size_t. I would also split up the assignment for readability. E.g. int initial_content_len; initial_content_len = asprintf(&initial_content, "\n# %s to be imported to branch %s\n", path_dir, branch_name); if (initial_content_len == -1) return got_error_from_errno("asprintf"); - todd