diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-03-04 14:24:18 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-03-04 14:24:18 +0000 |
commit | 27ce01674b7b6ef35e806f47736b4403b33a023d (patch) | |
tree | a28e32881fc98969a762ae0aeaddbeb2e4d576c9 /usr.sbin/rpki-client/rsync.c | |
parent | 68d6ecaafeb2e7518c98919e2f1a5fee21ac9a0d (diff) |
Use the same way to error out in out of memory situation.
Just use 'err(1, NULL);' there is no need to include the type of function
that failed since it is still impossible to locate the right call.
Just use a debugger in that case.
OK tb@ deraadt@
Diffstat (limited to 'usr.sbin/rpki-client/rsync.c')
-rw-r--r-- | usr.sbin/rpki-client/rsync.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rpki-client/rsync.c b/usr.sbin/rpki-client/rsync.c index 206475c54cc..e1c9cd71de6 100644 --- a/usr.sbin/rpki-client/rsync.c +++ b/usr.sbin/rpki-client/rsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsync.c,v 1.20 2021/03/04 14:02:34 claudio Exp $ */ +/* $OpenBSD: rsync.c,v 1.21 2021/03/04 14:24:17 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -141,13 +141,13 @@ proc_rsync(char *prog, char *bind_addr, int fd) if (getenv("PATH") == NULL) errx(1, "PATH is unset"); if ((path = strdup(getenv("PATH"))) == NULL) - err(1, "strdup"); + err(1, NULL); save = path; while ((pp = strsep(&path, ":")) != NULL) { if (*pp == '\0') continue; if (asprintf(&cmd, "%s/%s", pp, prog) == -1) - err(1, "asprintf"); + err(1, NULL); if (lstat(cmd, &stt) == -1) { free(cmd); continue; |