Date: Fri, 18 Dec 2009 21:12:37 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r200691 - head/sys/boot/uboot/lib Message-ID: <200912182112.nBILCbt8008906@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Fri Dec 18 21:12:37 2009 New Revision: 200691 URL: http://svn.freebsd.org/changeset/base/200691 Log: Fix ub_env_enum(): syscall() returns 0 when properly invoked. Modified: head/sys/boot/uboot/lib/glue.c Modified: head/sys/boot/uboot/lib/glue.c ============================================================================== --- head/sys/boot/uboot/lib/glue.c Fri Dec 18 21:02:32 2009 (r200690) +++ head/sys/boot/uboot/lib/glue.c Fri Dec 18 21:12:37 2009 (r200691) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912182112.nBILCbt8008906>