diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c index a5a6549a..df1badad 100644 --- a/libntfs-3g/attrib.c +++ b/libntfs-3g/attrib.c @@ -2215,7 +2215,7 @@ retry: } else written = ntfs_pwrite(vol->dev, wpos, to_write, b); - } + } } else written = to_write; /* If everything ok, update progress counters and continue. */ diff --git a/libntfs-3g/security.c b/libntfs-3g/security.c index b87745a4..1871175a 100644 --- a/libntfs-3g/security.c +++ b/libntfs-3g/security.c @@ -523,8 +523,7 @@ static int entersecurity_data(ntfs_volume *vol, */ res = ntfs_attr_shrink_size(vol->secure_ni,STREAM_SDS, 4, offs - gap + ALIGN_SDS_BLOCK + fullsz); - } - else + } else errno = ENOSPC; free(fullattr); } else