dbf2mysql (1.14a-3.1) u_char

Summary

 dbf.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

#!/bin/sh -e
## u_char.dpatch by Francesco Paolo Lovergine <frankie@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
                exit 1;;
esac

exit 0

@DPATCH@
diff -urNad /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf.c dbf2mysql-1.14a/dbf.c
--- /home/frankie/debian/mypkgs/dbf2mysql/dbf2mysql-1.14a/dbf.c	2003-10-07 20:40:57.000000000 +0200
+++ dbf2mysql-1.14a/dbf.c	2003-10-07 20:48:59.000000000 +0200
@@ -513,7 +513,7 @@
 {
     int     	t, i;
     u_char  	*dbffield;
-    char	*end, *sp;
+    u_char	*end, *sp;
     double	dblval;
     long long	int8val;
     long	int4val;
@@ -549,7 +549,7 @@
     {
 	switch(fields[t].db_type) {
 	  case 'C':		/* Character data */
-	    end = (char *)&dbffield[fields[t].db_flen - 1];
+	    end = &dbffield[fields[t].db_flen - 1];
 	    i = fields[t].db_flen;
 	    while (( i > 0) && ((*end < 0x21)/* || (*end > 0x7E)*/)) {
 		end--;
@@ -659,7 +659,7 @@
 	    break;
 
 	  default:
-	    end = (char *)dbffield;
+	    end = dbffield;
 	    i = fields[t].db_flen;
 	    while (( i > 0) && ((*end < 0x21)/* || (*end > 0x7E)*/)) {
 		end++;