mirror of https://github.com/dirtbags/moth.git
I misread man sprintf; corrected
This commit is contained in:
parent
4d981756ce
commit
2f3634167b
|
@ -95,7 +95,7 @@ main(int argc, char *argv[])
|
||||||
int fd;
|
int fd;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
fd = open(srv_path("token.keys/%*s", servicelen, service), O_RDONLY);
|
fd = open(srv_path("token.keys/%.*s", servicelen, service), O_RDONLY);
|
||||||
if (-1 == fd) {
|
if (-1 == fd) {
|
||||||
write(1, "!nosvc", 6);
|
write(1, "!nosvc", 6);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -125,7 +125,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
/* Append digest to service name. */
|
/* Append digest to service name. */
|
||||||
tokenlen = (size_t)snprintf(token, sizeof(token),
|
tokenlen = (size_t)snprintf(token, sizeof(token),
|
||||||
"%*s:%s",
|
"%.*s:%s",
|
||||||
servicelen, service, digest);
|
servicelen, service, digest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue