diff options
author | Barry Warsaw <barry@python.org> | 1996-12-11 00:29:14 +0000 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1996-12-11 00:29:14 +0000 |
commit | ace9cf6b9f022697febbd38c415e7762438deb93 (patch) | |
tree | c24096a20c821d5e23ebd3e043bfd6ee64c47bfe /Modules/nismodule.c | |
parent | a8cdb9ccd06698880465885f865228bc0ba05a8b (diff) | |
download | cpython-ace9cf6b9f022697febbd38c415e7762438deb93.tar.gz |
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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/nismodule.c b/Modules/nismodule.c index aa38e95782..c74957a8aa 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) |