Print this page
10132 smatch fixes for MDB
Reviewed by: Andy Fiddaman <andy@omniosce.org>

*** 1518,1530 **** return ("[ shmem ]"); if (map->map_flags & MDB_TGT_MAP_STACK) return ("[ stack ]"); if (map->map_flags & MDB_TGT_MAP_ANON) return ("[ anon ]"); ! if (map->map_name != NULL) ! return (map->map_name); return ("[ unknown ]"); } /*ARGSUSED*/ static int print_map(void *ignored, const mdb_map_t *map, const char *name) --- 1518,1530 ---- return ("[ shmem ]"); if (map->map_flags & MDB_TGT_MAP_STACK) return ("[ stack ]"); if (map->map_flags & MDB_TGT_MAP_ANON) return ("[ anon ]"); ! if (map->map_name[0] == '\0') return ("[ unknown ]"); + return (map->map_name); } /*ARGSUSED*/ static int print_map(void *ignored, const mdb_map_t *map, const char *name)
*** 2341,2351 **** { uint64_t cnt = 10; const char *c; mdb_pipe_t p; ! if (!flags & DCMD_PIPE) return (DCMD_USAGE); if (argc == 1 || argc == 2) { const char *num; --- 2341,2351 ---- { uint64_t cnt = 10; const char *c; mdb_pipe_t p; ! if (!(flags & DCMD_PIPE)) return (DCMD_USAGE); if (argc == 1 || argc == 2) { const char *num;