10138 smatch fixes for usr/src/cmd/sgs
*** 27,36 **** --- 27,40 ---- /* * Copyright (c) 1988 AT&T * All Rights Reserved */ + /* + * Copyright (c) 2018, Joyent, Inc. + */ + #include <memory.h> #include <malloc.h> #include <limits.h> #include <sgs.h>
*** 741,753 **** { size_t sz; unsigned u; Ehdr *eh = elf->ed_ehdr; - if (elf == 0) - return (-1); - ELFWLOCK(elf) switch (cmd) { default: _elf_seterr(EREQ_UPDATE, 0); ELFUNLOCK(elf) --- 745,754 ----