summaryrefslogtreecommitdiffstats
path: root/src/hdaccess.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-03-24 19:45:30 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-03-24 19:45:30 +0100
commit8b9047aa4e1c8e07823b32a62973769a05733673 (patch)
treea2ae8c0b0ff050555eb93ad58071ccbc905bd473 /src/hdaccess.c
parentd9a7d5788ac3c5d024fbcd66c47278a57f4557cd (diff)
src/hdaccess.c: remove unnecessary variable allocation
Diffstat (limited to 'src/hdaccess.c')
-rw-r--r--src/hdaccess.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hdaccess.c b/src/hdaccess.c
index 7b0c6a3..4974196 100644
--- a/src/hdaccess.c
+++ b/src/hdaccess.c
@@ -1120,7 +1120,7 @@ static int file_clean(disk_t *disk_car)
static int file_pread_aux(disk_t *disk, void *buf, const unsigned int count, const uint64_t offset)
{
- long int ret=-1;
+ long int ret;
int fd=((struct info_file_struct *)disk->data)->handle;
#if defined(__CYGWIN__)
if(lseek(fd,offset,SEEK_SET) < 0)
@@ -1249,7 +1249,7 @@ static void *file_pread_fast(disk_t *disk, void *buf, const unsigned int count,
static int file_pwrite_aux(disk_t *disk_car, const void *buf, const unsigned int count, const uint64_t offset)
{
int fd=((struct info_file_struct *)disk_car->data)->handle;
- long int ret=-1;
+ long int ret;
#if defined(HAVE_PWRITE) && !defined(__CYGWIN__)
ret=pwrite(fd,buf,count,offset);
if(ret<0 && errno == ENOSYS)