From 6630f5b4dc744c984086bc9dd8f8b17303fa39f6 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 7 Oct 1999 09:48:36 +0000 Subject: [PATCH] Allow res_get / res_get_def with NULL res. --- util/res.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/util/res.c b/util/res.c index b21e706..11946c3 100644 --- a/util/res.c +++ b/util/res.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: res.c,v $ - * Revision 1.25 1999-05-26 07:49:14 adam + * Revision 1.26 1999-10-07 09:48:36 adam + * Allow res_get / res_get_def with NULL res. + * + * Revision 1.25 1999/05/26 07:49:14 adam * C++ compilation. * * Revision 1.24 1999/02/02 14:51:42 adam @@ -262,7 +265,8 @@ char *res_get (Res r, const char *name) { struct res_entry *re; - assert (r); + if (!r) + return NULL; if (!r->init) reread (r); for (re = r->first; re; re=re->next) -- 1.7.10.4