~ubuntu-branches/ubuntu/trusty/hfsprogs/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/0011-Fix-types.patch

  • Committer: Package Import Robot
  • Author(s): Rogério Brito
  • Date: 2013-10-24 01:20:15 UTC
  • Revision ID: package-import@ubuntu.com-20131024012015-qsncxmr4cielybvz
Tags: 332.25-11
* debian/control: Remove DMUA flag.
* debian/rules: Override rules for which we don't have makefiles.
  (Closes: #724195)
* debian/patches:
  + Change the headers to be friendlier with gbp pq.
  + Remove unreferenced patches in series file.
  + Coalesce all patches touching man pages into one.
  + Regenerate everything from patch-queue branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito@ime.usp.br>
 
2
Date: Thu, 24 Oct 2013 01:11:22 -0200
 
3
Subject: Fix types
 
4
 
 
5
---
 
6
 fsck_hfs.tproj/cache.c | 30 ++++++++++++++++--------------
 
7
 1 file changed, 16 insertions(+), 14 deletions(-)
 
8
 
 
9
diff --git a/fsck_hfs.tproj/cache.c b/fsck_hfs.tproj/cache.c
 
10
index 527088a..540fa0b 100644
 
11
--- a/fsck_hfs.tproj/cache.c
 
12
+++ b/fsck_hfs.tproj/cache.c
 
13
@@ -961,20 +961,21 @@ int CacheLookup (Cache_t *cache, uint64_t off, Tag_t **tag)
 
14
  */
 
15
 int CacheRawRead (Cache_t *cache, uint64_t off, uint32_t len, void *buf)
 
16
 {
 
17
-       uint64_t        result;
 
18
+       off_t   result1;
 
19
+       ssize_t result2;
 
20
                
 
21
        /* Both offset and length must be multiples of the device block size */
 
22
        if (off % cache->DevBlockSize) return (EINVAL);
 
23
        if (len % cache->DevBlockSize) return (EINVAL);
 
24
        
 
25
        /* Seek to the position */
 
26
-       result = lseek (cache->FD_R, off, SEEK_SET);
 
27
-       if (result < 0) return (errno);
 
28
-       if (result != off) return (ENXIO);
 
29
+       result1 = lseek(cache->FD_R, off, SEEK_SET);
 
30
+       if (result1 < 0) return (errno);
 
31
+       if (result1 != off) return (ENXIO);
 
32
        /* Read into the buffer */
 
33
-       result = read (cache->FD_R, buf, len);
 
34
-       if (result < 0) return (errno);
 
35
-       if (result == 0) return (ENXIO);
 
36
+       result2 = read(cache->FD_R, buf, len);
 
37
+       if (result2 < 0) return (errno);
 
38
+       if (result2 == 0) return (ENXIO);
 
39
 
 
40
        /* Update counters */
 
41
        cache->DiskRead++;
 
42
@@ -989,21 +990,22 @@ int CacheRawRead (Cache_t *cache, uint64_t off, uint32_t len, void *buf)
 
43
  */
 
44
 int CacheRawWrite (Cache_t *cache, uint64_t off, uint32_t len, void *buf)
 
45
 {
 
46
-       uint64_t        result;
 
47
+       off_t   result1;
 
48
+       ssize_t result2;
 
49
        
 
50
        /* Both offset and length must be multiples of the device block size */
 
51
        if (off % cache->DevBlockSize) return (EINVAL);
 
52
        if (len % cache->DevBlockSize) return (EINVAL);
 
53
        
 
54
        /* Seek to the position */
 
55
-       result = lseek (cache->FD_W, off, SEEK_SET);
 
56
-       if (result < 0) return (errno);
 
57
-       if (result != off) return (ENXIO);
 
58
+       result1 = lseek (cache->FD_W, off, SEEK_SET);
 
59
+       if (result1 < 0) return (errno);
 
60
+       if (result1 != off) return (ENXIO);
 
61
        
 
62
        /* Write into the buffer */
 
63
-       result = write (cache->FD_W, buf, len);
 
64
-       if (result < 0) return (errno);
 
65
-       if (result == 0) return (ENXIO);
 
66
+       result2 = write (cache->FD_W, buf, len);
 
67
+       if (result2 < 0) return (errno);
 
68
+       if (result2 == 0) return (ENXIO);
 
69
        
 
70
        /* Update counters */
 
71
        cache->DiskWrite++;