Re: PATCH [4/5]: pyblock: Py_GenericNew does not do anything with its args argument.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



took me some time to understand but it looks fine to me.
On Wed, Feb 25, 2009 at 08:16:42PM +0100, Hans de Goede wrote:
> Py_GenericNew does not do anything with its args argument, so no need to
> build one.
> ---
>  dmraid.c |    9 ++-------
>  1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/dmraid.c b/dmraid.c
> index 5b5cf6c..51d4ad6 100644
> --- a/dmraid.c
> +++ b/dmraid.c
> @@ -850,7 +850,7 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
>  	struct raid_set *rs = set->rs;
>
>  	PyObject *m = NULL, *md = NULL;
> -	PyObject *type = NULL, *args = NULL;
> +	PyObject *type = NULL;
>  	PyObject *map = NULL, *table = NULL;
>
>  	PyObject *iret = NULL;
> @@ -859,10 +859,6 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
>  	if (!table)
>  		goto out;
>
> -	args = Py_BuildValue("(sO)", rs->name, table);
> -	if (!args)
> -		goto out;
> -
>  	m = PyImport_ImportModule("block.dm");
>  	if (!m)
>  		goto out;
> @@ -875,7 +871,7 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
>  	if (!type)
>  		goto out;
>
> -	map = PyType_GenericNew((PyTypeObject *)type, args, NULL);
> +	map = PyType_GenericNew((PyTypeObject *)type, NULL, NULL);
>  	if (!map)
>  		goto out;
>
> @@ -887,7 +883,6 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
>
>  out:
>  	Py_XDECREF(iret);
> -	Py_XDECREF(args);
>  	Py_XDECREF(table);
>  	if (!map && !PyErr_Occurred()) {
>  		if (errno != 0)
> -- 
> 1.6.1.3
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux