summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2022-10-06 16:48:38 +0200
committerJose M. Guisado <jguisado@soleta.eu>2022-12-15 10:52:47 +0100
commite58c21bdc837fa5d351dbcccdfcf6e3a0c020294 (patch)
tree4745eff767a8071ebdec7fb00c7b6e2adbb3b136
parent06e59706fc58fe629832a3f4a89cc5d88161e3c8 (diff)
context: rename set_size_unit variables
Renames 'cval' to 'szunit' for better readability. This variable is used to store the size_unit constant that is going to be set using fdisk_set_size_unit.
-rw-r--r--context.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/context.c b/context.c
index 1524baa..28c0b7e 100644
--- a/context.c
+++ b/context.c
@@ -187,7 +187,7 @@ static PyObject *Context_get_size_unit(ContextObject *self)
}
static int Context_set_size_unit(ContextObject *self, PyObject *value, void *closure)
{
- int cval, ret;
+ int szunit;
if (value == NULL) {
PyErr_SetString(PyExc_TypeError,
@@ -201,8 +201,8 @@ static int Context_set_size_unit(ContextObject *self, PyObject *value, void *clo
return -1;
}
- cval = (int) PyLong_AsLong(value);
- if (fdisk_set_size_unit(self->cxt, cval) < 0) {
+ szunit = (int) PyLong_AsLong(value);
+ if (fdisk_set_size_unit(self->cxt, szunit) < 0) {
PyErr_SetString(PyExc_TypeError,
"Cannot set unit size: invalid size type value");
return -1;