diff options
author | marcel <marcel@FreeBSD.org> | 2009-12-18 21:12:37 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2009-12-18 21:12:37 +0000 |
commit | f43cb1c5dee970dd813fbf99b0c9f297eb7d2b6d (patch) | |
tree | 3182cc3a5c9a033a9b05f12377ff27bcefabe8b9 /sys/boot/uboot | |
parent | 41fac4197d5162b85f93202104ac73795aefe328 (diff) | |
download | FreeBSD-src-f43cb1c5dee970dd813fbf99b0c9f297eb7d2b6d.zip FreeBSD-src-f43cb1c5dee970dd813fbf99b0c9f297eb7d2b6d.tar.gz |
Fix ub_env_enum(): syscall() returns 0 when properly invoked.
Diffstat (limited to 'sys/boot/uboot')
-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 5a9591c..5483732 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); |