From 3696c524a4c24d86080926eebb81f9e02412ab01 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 11 Dec 1996 00:29:14 +0000 Subject: nis_maplist(): Use check of yp_get_default_domain() return value that's used in other parts of this module. nis_maps(): use PyArg_NoArgs(). --- Modules/nismodule.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/nismodule.c b/Modules/nismodule.c index aa38e95..c74957a 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -295,7 +295,9 @@ nis_maplist () char *server = ""; int mapi = 0; - yp_get_default_domain (&dom); + if ((err = yp_get_default_domain (&dom)) != 0) + return nis_error(err); + while (!strcmp("", server) && aliases[mapi].map != 0L) { yp_master (dom, aliases[mapi].map, &server); mapi++; @@ -325,6 +327,8 @@ nis_maps (self, args) nismaplist *maps; PyObject *list; + if (!PyArg_NoArgs(args)) + return NULL; if ((maps = nis_maplist ()) == NULL) return NULL; if ((list = PyList_New(0)) == NULL) -- cgit v0.12