summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Teske <dteske@FreeBSD.org>2018-06-20 05:45:41 +0000
committerDevin Teske <dteske@FreeBSD.org>2018-06-20 05:45:41 +0000
commit2af55a655a308dce575f9937b0f811240e7d0ff8 (patch)
tree07084c05a22500ee78f87546fe323dca36f82915
parent5e9dd5f16429a51956d4347a1c4d7b7414c67381 (diff)
Notes
-rw-r--r--lib/libdpv/dialog_util.c5
-rw-r--r--lib/libdpv/dprompt.c2
-rw-r--r--lib/libdpv/util.c5
3 files changed, 5 insertions, 7 deletions
diff --git a/lib/libdpv/dialog_util.c b/lib/libdpv/dialog_util.c
index 21baf98606fb0..f4d24150b6e1e 100644
--- a/lib/libdpv/dialog_util.c
+++ b/lib/libdpv/dialog_util.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2013-2014 Devin Teske <dteske@FreeBSD.org>
+ * Copyright (c) 2013-2018 Devin Teske <dteske@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -328,8 +328,7 @@ dialog_spawn_gauge(char *init_prompt, pid_t *pid)
posix_spawn_file_actions_addclose(&action, stdin_pipe[1]);
error = posix_spawnp(pid, dialog, &action,
(const posix_spawnattr_t *)NULL, dargv, environ);
- if (error != 0)
- err(EXIT_FAILURE, "%s: posix_spawnp(3)", __func__);
+ if (error != 0) err(EXIT_FAILURE, "%s", dialog);
/* NB: Do not free(3) *dargv[], else SIGSEGV */
diff --git a/lib/libdpv/dprompt.c b/lib/libdpv/dprompt.c
index e3d636a840df4..b4fdd9959e02e 100644
--- a/lib/libdpv/dprompt.c
+++ b/lib/libdpv/dprompt.c
@@ -89,7 +89,7 @@ spin_char(void)
{
char ch;
- if (spin_cp == '\0')
+ if (*spin_cp == '\0')
spin_cp = spin;
ch = *spin_cp;
diff --git a/lib/libdpv/util.c b/lib/libdpv/util.c
index 25fc1cb033974..5750f810c4aef 100644
--- a/lib/libdpv/util.c
+++ b/lib/libdpv/util.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2013-2014 Devin Teske <dteske@FreeBSD.org>
+ * Copyright (c) 2013-2018 Devin Teske <dteske@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -100,8 +100,7 @@ shell_spawn_pipecmd(const char *cmd, const char *label, pid_t *pid)
posix_spawn_file_actions_addclose(&action, stdin_pipe[1]);
error = posix_spawnp(pid, shellcmd, &action,
(const posix_spawnattr_t *)NULL, shellcmd_argv, environ);
- if (error != 0)
- err(EXIT_FAILURE, "%s: posix_spawnp(3)", __func__);
+ if (error != 0) err(EXIT_FAILURE, "%s", shellcmd);
return stdin_pipe[1];
}