diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2022-12-15 17:51:17 +0100 |
---|---|---|
committer | Jose M. Guisado <jguisado@soleta.eu> | 2022-12-15 17:51:17 +0100 |
commit | 9bf2d030c9135a277449d455fb1561508c942326 (patch) | |
tree | 94dc49609b745b6ed54b80544ca668d58ef9c850 | |
parent | f08c9618ea957b9a4de7d4d7e684320e94506131 (diff) |
fdisk: declare kwlist array static
-rw-r--r-- | context.c | 2 | ||||
-rw-r--r-- | label.c | 5 | ||||
-rw-r--r-- | partition.c | 2 |
3 files changed, 3 insertions, 6 deletions
@@ -43,7 +43,7 @@ static PyObject *Context_new(PyTypeObject *type, #define Context_HELP "Context(device=None, details=True, readonly=False)" static int Context_init(ContextObject *self, PyObject *args, PyObject *kwds) { - char *kwlist[] = { + static char *kwlist[] = { "device", "details", "readonly", NULL }; @@ -37,12 +37,9 @@ static PyObject *Label_new(PyTypeObject *type, #define Label_HELP "Label(context=None)" static int Label_init(LabelObject *self, PyObject *args, PyObject *kwds) { + static char *kwlist[] = { "context", NULL }; ContextObject *cxt = NULL; struct fdisk_label *lb; - char *kwlist[] = { - "context", - NULL - }; if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!", kwlist, diff --git a/partition.c b/partition.c index 8685c3f..5111bec 100644 --- a/partition.c +++ b/partition.c @@ -40,7 +40,7 @@ static PyObject *Partition_new(PyTypeObject *type, "end_follow_default=False)" static int Partition_init(PartitionObject *self, PyObject *args, PyObject *kwds) { - char *kwlist[] = { + static char *kwlist[] = { "partno_follow_default", "start_follow_default", "end_follow_default", |