[Pkg-wmaker-commits] [wmbiff] 57/77: BSD fix (no strndup, no sighandler_t)

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:01:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to tag wmbiff_0_4_0
in repository wmbiff.

commit b69901a02f630c8c9ab89b45c04ed80d0918ce9c
Author: bluehal <bluehal>
Date:   Sat Apr 20 09:27:16 2002 +0000

    BSD fix (no strndup, no sighandler_t)
---
 wmbiff/ShellClient.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/wmbiff/ShellClient.c b/wmbiff/ShellClient.c
index 775ce39..aaa7714 100644
--- a/wmbiff/ShellClient.c
+++ b/wmbiff/ShellClient.c
@@ -25,7 +25,7 @@
 /* kind_popen bumps off the sigchld handler - we care whether
    a checking program fails. */
 
-sighandler_t old_signal_handler;
+sig_t old_signal_handler;
 
 FILE *kind_popen(const char *command, const char *type)
 {
@@ -111,7 +111,8 @@ char *backtickExpand(Pop3 pc, const char *path)
 			return NULL;
 		}
 		strncat(bigbuffer, path, tickstart - path);
-		command = strndup(tickstart + 1, tickend - tickstart - 1);
+		command = strdup(tickstart + 1);
+		command[tickend - tickstart - 1] = '\0';
 		commandoutput = grabCommandOutput(pc, command);
 		free(command);
 		if (commandoutput != NULL) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git



More information about the Pkg-wmaker-commits mailing list