diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2009-12-18 21:12:37 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2009-12-18 21:12:37 +0000 |
| commit | e7f42eade659572f3ac32a544f840e52a27fa5d4 (patch) | |
| tree | 3182cc3a5c9a033a9b05f12377ff27bcefabe8b9 /sys/boot | |
| parent | e6d84d057a1e1f0c4cbf13c9d787dc89607e6524 (diff) | |
Notes
Diffstat (limited to 'sys/boot')
| -rw-r--r-- | sys/boot/uboot/lib/glue.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/boot/uboot/lib/glue.c b/sys/boot/uboot/lib/glue.c index 5a9591c90f0c..5483732881a0 100644 --- a/sys/boot/uboot/lib/glue.c +++ b/sys/boot/uboot/lib/glue.c @@ -568,17 +568,16 @@ ub_env_enum(const char *last) const char *env, *str; int i; - env = NULL; - /* * It's OK to pass only the name piece as last (and not the whole * 'name=val' string), since the API_ENUM_ENV call uses envmatch() * internally, which handles such case */ - if (!syscall(API_ENV_ENUM, NULL, (uint32_t)last, (uint32_t)&env)) + env = NULL; + if (syscall(API_ENV_ENUM, NULL, (uint32_t)last, (uint32_t)&env) != 0) return (NULL); - if (!env) + if (env == NULL) /* no more env. variables to enumerate */ return (NULL); |
