From fd7307bd4efb5739a949256d6836dc6535c877c9 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 2 Feb 2010 01:35:31 +0100 Subject: lib: lookup(): support 0 as a key, use NULL str for end of list --- lib/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/log.c') diff --git a/lib/log.c b/lib/log.c index e2ac0386..58b25a09 100644 --- a/lib/log.c +++ b/lib/log.c @@ -761,7 +761,7 @@ lookup (const struct message *mes, int key) { const struct message *pnt; - for (pnt = mes; pnt->key != 0; pnt++) + for (pnt = mes; pnt->str; pnt++) if (pnt->key == key) return pnt->str; -- cgit v1.2.3