Remove unused variables 'pa', 'next', 'tb' and their corresponding
fdisk_unref_partition()/fdisk_unref_table() calls in the cleanup
path -- all three are initialized to NULL and never reassigned.
[kzak@redhat.com: - fix identification, remove also 'tb']
Signed-off-by: lijian <lijian01@kylinos.cn>
Signed-off-by: Karel Zak <kzak@redhat.com>
void resize_partition(struct fdisk_context *cxt)
{
- struct fdisk_partition *pa = NULL, *npa = NULL, *next = NULL;
+ struct fdisk_partition *npa = NULL;
char *query = NULL, *response = NULL, *default_size;
- struct fdisk_table *tb = NULL;
uint64_t max_size, secs;
uintmax_t size;
size_t i = 0;
out:
free(query);
free(response);
- fdisk_unref_partition(next);
- fdisk_unref_partition(pa);
fdisk_unref_partition(npa);
- fdisk_unref_table(tb);
return;
err: