Skip to content

Commit

Permalink
block: remove unused variable in bdrv_commit
Browse files Browse the repository at this point in the history
As Stefan pointed out, the variable 'filename' in bdrv_commit is unused,
despite being maintained in previous patches.

With this patch, get rid of the variable for good.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
codyprime authored and kevmw committed Jan 23, 2015
1 parent 564d64b commit a1a11d1
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions block.c
Expand Up @@ -2207,7 +2207,6 @@ int bdrv_commit(BlockDriverState *bs)
int n, ro, open_flags;
int ret = 0;
uint8_t *buf = NULL;
char filename[PATH_MAX];

if (!drv)
return -ENOMEDIUM;
Expand All @@ -2222,8 +2221,6 @@ int bdrv_commit(BlockDriverState *bs)
}

ro = bs->backing_hd->read_only;
/* Use pstrcpy (not strncpy): filename must be NUL-terminated. */
pstrcpy(filename, sizeof(filename), bs->backing_hd->filename);
open_flags = bs->backing_hd->open_flags;

if (ro) {
Expand Down

0 comments on commit a1a11d1

Please sign in to comment.