abuild-fetch: fix -Wformat-security warnings
This commit is contained in:
parent
5a273edf4d
commit
9de1cfbf03
@ -78,7 +78,7 @@ int fetch(char *url, const char *destdir)
|
|||||||
|
|
||||||
name = strrchr(url, '/');
|
name = strrchr(url, '/');
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
errx(1, "%s: no '/' in url");
|
errx(1, "%s: no '/' in url", url);
|
||||||
p = strstr(url, "::");
|
p = strstr(url, "::");
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
name = url;
|
name = url;
|
||||||
@ -97,7 +97,7 @@ int fetch(char *url, const char *destdir)
|
|||||||
|
|
||||||
lockfd = open(lockfile, O_WRONLY|O_CREAT, 0660);
|
lockfd = open(lockfile, O_WRONLY|O_CREAT, 0660);
|
||||||
if (lockfd < 0)
|
if (lockfd < 0)
|
||||||
err(1, lockfile);
|
err(1, "%s", lockfile);
|
||||||
|
|
||||||
if (fcntl(lockfd, F_SETLK, &fl) < 0) {
|
if (fcntl(lockfd, F_SETLK, &fl) < 0) {
|
||||||
int i;
|
int i;
|
||||||
@ -133,7 +133,7 @@ int fetch(char *url, const char *destdir)
|
|||||||
execvp(curlcmd.argv[0], curlcmd.argv);
|
execvp(curlcmd.argv[0], curlcmd.argv);
|
||||||
printf("Using wget\n");
|
printf("Using wget\n");
|
||||||
execvp(wgetcmd.argv[0], wgetcmd.argv);
|
execvp(wgetcmd.argv[0], wgetcmd.argv);
|
||||||
warn(wgetcmd.argv[0]);
|
warn("%s", wgetcmd.argv[0]);
|
||||||
unlink(lockfile);
|
unlink(lockfile);
|
||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user