diff options
author | dfr <dfr@FreeBSD.org> | 1999-03-18 11:00:48 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1999-03-18 11:00:48 +0000 |
commit | 3bb3f6f67feb111972a8dced971656aeb6ce89cb (patch) | |
tree | 288c4cc3f6c57349f2425d76561314de7032aaec /sys/boot/alpha | |
parent | fec5512e0cf230b9989992a4fa8f567ba6dce5a9 (diff) | |
download | FreeBSD-src-3bb3f6f67feb111972a8dced971656aeb6ce89cb.zip FreeBSD-src-3bb3f6f67feb111972a8dced971656aeb6ce89cb.tar.gz |
Don't choke in MOD_ARGS() if mp->m_args is NULL.
Diffstat (limited to 'sys/boot/alpha')
-rw-r--r-- | sys/boot/alpha/libalpha/bootinfo.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/boot/alpha/libalpha/bootinfo.c b/sys/boot/alpha/libalpha/bootinfo.c index e464414..6062320 100644 --- a/sys/boot/alpha/libalpha/bootinfo.c +++ b/sys/boot/alpha/libalpha/bootinfo.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bootinfo.c,v 1.3 1998/10/15 21:55:58 dfr Exp $ + * $Id: bootinfo.c,v 1.4 1999/03/08 11:05:42 dcs Exp $ */ #include <stand.h> @@ -88,10 +88,11 @@ bi_copyenv(vm_offset_t addr) } #define MOD_STR(t, a, s) { \ + const char *p = s ? s : ""; \ COPY32(t, a); \ - COPY32(strlen(s) + 1, a); \ - alpha_copyin(s, a, strlen(s) + 1); \ - a += roundup(strlen(s) + 1, sizeof(u_int64_t));\ + COPY32(strlen(p) + 1, a); \ + alpha_copyin(p, a, strlen(p) + 1); \ + a += roundup(strlen(p) + 1, sizeof(u_int64_t));\ } #define MOD_NAME(a, s) MOD_STR(MODINFO_NAME, a, s) |