[unshield] 01/03: New upstream version 1.4.2

Evgeni Golov evgeni at moszumanska.debian.org
Sat Jan 21 09:30:56 UTC 2017


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

evgeni pushed a commit to branch master
in repository unshield.

commit 1f1ccd5b54ff341f93ab5f581e68cead61e50282
Author: Evgeni Golov <evgeni at debian.org>
Date:   Sat Jan 21 10:26:43 2017 +0100

    New upstream version 1.4.2
---
 .travis.yml  |  1 +
 lib/helper.c |  9 +++++----
 run-tests.sh | 13 +++++++++++--
 3 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index ac69139..9c5d191 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,7 @@ language: c
 
 compiler:
   - gcc
+  - clang
 
 env:
   global:
diff --git a/lib/helper.c b/lib/helper.c
index 54fa870..0c61bbe 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#include <unistd.h>
 
 #ifdef _WIN32
   #define realpath(N,R) _fullpath((R),(N),_MAX_PATH)
@@ -26,18 +27,18 @@ FILE* unshield_fopen_for_reading(Unshield* unshield, int index, const char* suff
   if (unshield && unshield->filename_pattern)
   {
     FILE* result = NULL;
-    char* filename;
-    char* dirname;
+    char* filename = NULL;
+    char* dirname = NULL;
     char * p = strrchr(unshield->filename_pattern, '/');
     const char *q;
     struct dirent *dent = NULL;
-    DIR *sourcedir;
+    DIR *sourcedir = NULL;
     long int path_max;
 
     #ifdef PATH_MAX
     path_max = PATH_MAX;
     #else
-    path_max = pathconf(prefix, _PC_PATH_MAX);
+    path_max = pathconf(unshield->filename_pattern, _PC_PATH_MAX);
     if (path_max <= 0)
       path_max = 4096;
     #endif
diff --git a/run-tests.sh b/run-tests.sh
index 0e902c3..07c50e3 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -1,5 +1,14 @@
 #!/bin/bash
-find `dirname $0`/test/v* -name '*.sh' | while read SCRIPT; do
+ALL_RET=0
+for SCRIPT in $(find $(dirname $0)/test/v* -name '*.sh'); do
   echo -n "Running test $SCRIPT..."
-  bash ${SCRIPT} && echo "succeeded" || echo "FAILED with code $?"
+  bash ${SCRIPT}
+  TEST_RET=$?
+  if [ "$TEST_RET" = "0" ]; then
+    echo "succeeded"
+  else
+    echo "FAILED with code $TEST_RET"
+    ALL_RET=1
+  fi
 done
+exit $ALL_RET

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



More information about the Pkg-games-commits mailing list