-/* $Id: dbm.c,v 1.5 2016/10/18 22:27:25 schwarze Exp $ */
+/* $Id: dbm.c,v 1.7 2019/07/01 22:56:24 schwarze Exp $ */
/*
* Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
*
assert(ip < npages);
res.name = dbm_get(pages[ip].name);
if (res.name == NULL)
- res.name = "(NULL)";
+ res.name = "(NULL)\0";
res.sect = dbm_get(pages[ip].sect);
if (res.sect == NULL)
- res.sect = "(NULL)";
+ res.sect = "(NULL)\0";
res.arch = pages[ip].arch ? dbm_get(pages[ip].arch) : NULL;
res.desc = dbm_get(pages[ip].desc);
if (res.desc == NULL)
res.desc = "(NULL)";
res.file = dbm_get(pages[ip].file);
if (res.file == NULL)
- res.file = " (NULL)";
+ res.file = " (NULL)\0";
res.addr = dbm_addr(pages + ip);
return &res;
}
page_bytitle(enum iter arg_iter, const struct dbm_match *arg_match)
{
static const struct dbm_match *match;
- static const char *cp;
+ static const char *cp;
static int32_t ip;
struct dbm_res res = {-1, 0};
static const struct dbm_match *match;
struct dbm_res res = {-1, 0};
static int32_t ip;
- const char *cp;
+ const char *cp;
/* Initialize for a new iteration. */