summaryrefslogtreecommitdiffstats
path: root/Modules/nismodule.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1996-12-11 00:29:14 (GMT)
committerBarry Warsaw <barry@python.org>1996-12-11 00:29:14 (GMT)
commit3696c524a4c24d86080926eebb81f9e02412ab01 (patch)
tree36b7bc0f4d326f3787b458c9402b2e394832a42b /Modules/nismodule.c
parentadbf4e66df714efecbf8f3cfd3c849fc043b4323 (diff)
downloadcpython-3696c524a4c24d86080926eebb81f9e02412ab01.zip
cpython-3696c524a4c24d86080926eebb81f9e02412ab01.tar.gz
cpython-3696c524a4c24d86080926eebb81f9e02412ab01.tar.bz2
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().
Diffstat (limited to 'Modules/nismodule.c')
-rw-r--r--Modules/nismodule.c6
1 files changed, 5 insertions, 1 deletions
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)