diff options
author | 2016-08-23 18:12:09 +0000 | |
---|---|---|
committer | 2016-08-23 18:12:09 +0000 | |
commit | 437a9cead6e635e00f586e892cab9b6ce45223b2 (patch) | |
tree | 3356d87fe2715989f97fe92cfddfa6421c41dc7a | |
parent | Type. 'if' != 'lf'. Fixes error message and setting hostname from dhcp lease (diff) | |
download | wireguard-openbsd-437a9cead6e635e00f586e892cab9b6ce45223b2.tar.xz wireguard-openbsd-437a9cead6e635e00f586e892cab9b6ce45223b2.zip |
Actually make fdt_find_node() return NULL if the node couldn't be found.
ok tom@
-rw-r--r-- | sys/dev/ofw/fdt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ofw/fdt.c b/sys/dev/ofw/fdt.c index 0a1f0138a1e..b589bf1c645 100644 --- a/sys/dev/ofw/fdt.c +++ b/sys/dev/ofw/fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdt.c,v 1.18 2016/07/26 22:10:10 patrick Exp $ */ +/* $OpenBSD: fdt.c,v 1.19 2016/08/23 18:12:09 kettenis Exp $ */ /* * Copyright (c) 2009 Dariusz Swiderski <sfires@sfires.net> @@ -410,6 +410,9 @@ fdt_find_node(char *name) } } + if (child == NULL) + return NULL; /* No match found. */ + p = q; } |