diff options
author | Rob Landley <rob@landley.net> | 2006-03-01 16:39:45 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-03-01 16:39:45 +0000 |
commit | e7c43b66d74ee9902a6732122788a7a16bcfbf18 (patch) | |
tree | ebb8583e9e1265588592614c0b4878daded44125 /e2fsprogs/ext2fs/unix_io.c | |
parent | 93f2286e6e59dab5eed14b5912a79254031c5a62 (diff) |
Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
from before "if(x) free(x)".
Diffstat (limited to 'e2fsprogs/ext2fs/unix_io.c')
-rw-r--r-- | e2fsprogs/ext2fs/unix_io.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/e2fsprogs/ext2fs/unix_io.c b/e2fsprogs/ext2fs/unix_io.c index 36b222577..7f57afddc 100644 --- a/e2fsprogs/ext2fs/unix_io.c +++ b/e2fsprogs/ext2fs/unix_io.c @@ -280,8 +280,7 @@ static void free_cache(struct unix_private_data *data) cache->access_time = 0; cache->dirty = 0; cache->in_use = 0; - if (cache->buf) - ext2fs_free_mem(&cache->buf); + ext2fs_free_mem(&cache->buf); cache->buf = 0; } } @@ -461,8 +460,7 @@ cleanup: free_cache(data); ext2fs_free_mem(&data); } - if (io) - ext2fs_free_mem(&io); + ext2fs_free_mem(&io); return retval; } @@ -487,8 +485,7 @@ static errcode_t unix_close(io_channel channel) free_cache(data); ext2fs_free_mem(&channel->private_data); - if (channel->name) - ext2fs_free_mem(&channel->name); + ext2fs_free_mem(&channel->name); ext2fs_free_mem(&channel); return retval; } |