Package: hfsprogs / 332.25-11

0011-Fix-types.patch Patch series | download
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
Date: Thu, 24 Oct 2013 01:11:22 -0200
Subject: Fix types

---
 fsck_hfs.tproj/cache.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/fsck_hfs.tproj/cache.c b/fsck_hfs.tproj/cache.c
index 527088a..540fa0b 100644
--- a/fsck_hfs.tproj/cache.c
+++ b/fsck_hfs.tproj/cache.c
@@ -961,20 +961,21 @@ int CacheLookup (Cache_t *cache, uint64_t off, Tag_t **tag)
  */
 int CacheRawRead (Cache_t *cache, uint64_t off, uint32_t len, void *buf)
 {
-	uint64_t	result;
+	off_t	result1;
+	ssize_t result2;
 		
 	/* Both offset and length must be multiples of the device block size */
 	if (off % cache->DevBlockSize) return (EINVAL);
 	if (len % cache->DevBlockSize) return (EINVAL);
 	
 	/* Seek to the position */
-	result = lseek (cache->FD_R, off, SEEK_SET);
-	if (result < 0) return (errno);
-	if (result != off) return (ENXIO);
+	result1 = lseek(cache->FD_R, off, SEEK_SET);
+	if (result1 < 0) return (errno);
+	if (result1 != off) return (ENXIO);
 	/* Read into the buffer */
-	result = read (cache->FD_R, buf, len);
-	if (result < 0) return (errno);
-	if (result == 0) return (ENXIO);
+	result2 = read(cache->FD_R, buf, len);
+	if (result2 < 0) return (errno);
+	if (result2 == 0) return (ENXIO);
 
 	/* Update counters */
 	cache->DiskRead++;
@@ -989,21 +990,22 @@ int CacheRawRead (Cache_t *cache, uint64_t off, uint32_t len, void *buf)
  */
 int CacheRawWrite (Cache_t *cache, uint64_t off, uint32_t len, void *buf)
 {
-	uint64_t	result;
+	off_t	result1;
+	ssize_t result2;
 	
 	/* Both offset and length must be multiples of the device block size */
 	if (off % cache->DevBlockSize) return (EINVAL);
 	if (len % cache->DevBlockSize) return (EINVAL);
 	
 	/* Seek to the position */
-	result = lseek (cache->FD_W, off, SEEK_SET);
-	if (result < 0) return (errno);
-	if (result != off) return (ENXIO);
+	result1 = lseek (cache->FD_W, off, SEEK_SET);
+	if (result1 < 0) return (errno);
+	if (result1 != off) return (ENXIO);
 	
 	/* Write into the buffer */
-	result = write (cache->FD_W, buf, len);
-	if (result < 0) return (errno);
-	if (result == 0) return (ENXIO);
+	result2 = write (cache->FD_W, buf, len);
+	if (result2 < 0) return (errno);
+	if (result2 == 0) return (ENXIO);
 	
 	/* Update counters */
 	cache->DiskWrite++;