Changeset 2718
- Timestamp:
- 06/16/08 13:32:49 (5 months ago)
- Files:
-
- trunk/lib_internal/unify-copy.c (modified) (1 diff)
- trunk/src/check-unixfile.c (modified) (1 diff)
- trunk/src/h2ext.c (modified) (1 diff)
- trunk/src/testsuite/hashcalc-plain.c (modified) (1 diff)
- trunk/src/vhashify.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib_internal/unify-copy.c
r2544 r2718 133 133 if (buf_size > MMAP_BLOCKSIZE) buf_size = MMAP_BLOCKSIZE; 134 134 135 if ((in_buf = mmap(0, buf_size, PROT_READ, MAP_SHARED, in_fd, offset))== 0||136 (out_buf = mmap(0, buf_size, PROT_WRITE, MAP_SHARED, out_fd, offset))== 0) {135 if ((in_buf = mmap(0, buf_size, PROT_READ, MAP_SHARED, in_fd, offset))==MAP_FAILED || 136 (out_buf = mmap(0, buf_size, PROT_WRITE, MAP_SHARED, out_fd, offset))==MAP_FAILED) { 137 137 perror("mmap()"); 138 138 goto out; trunk/src/check-unixfile.c
r1814 r2718 74 74 else if (l>0) { 75 75 data = mmap(0, l, PROT_READ, MAP_PRIVATE, fd, 0); 76 if (data== 0) {76 if (data==MAP_FAILED) { 77 77 perror("mmap()"); 78 78 exit(wrapper_exit_code); trunk/src/h2ext.c
r2674 r2718 149 149 Efstat(fd, &st); 150 150 mapping = mmap(NULL, MIN(st.st_size, MAX_PEEK_SIZE), PROT_READ, MAP_SHARED, fd, 0); 151 if ( !mapping) {151 if (mapping == MAP_FAILED) { 152 152 perror("mmap()"); 153 153 Eclose(fd); trunk/src/testsuite/hashcalc-plain.c
r2685 r2718 77 77 if (buf_size>HASH_BLOCKSIZE) buf_size = HASH_BLOCKSIZE; 78 78 79 assert((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))!= 0);79 assert((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))!=MAP_FAILED); 80 80 offset += buf_size; 81 81 assert(ensc_crypto_hashctx_update(&hash_context, buf, buf_size)!=-1); trunk/src/vhashify.c
r2685 r2718 333 333 if (buf_size>HASH_BLOCKSIZE) buf_size = HASH_BLOCKSIZE; 334 334 335 if ((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))== 0) {335 if ((buf=mmap(0, buf_size, PROT_READ, MAP_SHARED, fd, offset))==MAP_FAILED) { 336 336 perror("mmap(<hash>)"); 337 337 goto out;
