File: 20-u-char.patch

package info (click to toggle)
dbf2mysql 1.14a-5
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 320 kB
  • sloc: ansic: 4,680; makefile: 147
file content (36 lines) | stat: -rw-r--r-- 854 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Francesco Paolo Lovergine <frankie@debian.org>
Subject: No description.

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

--- a/dbf.c
+++ b/dbf.c
@@ -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--;
@@ -657,7 +657,7 @@
 	    break;
 
 	  default:
-	    end = (char *)dbffield;
+	    end = dbffield;
 	    i = fields[t].db_flen;
 	    while (( i > 0) && ((*end < 0x21)/* || (*end > 0x7E)*/)) {
 		end++;