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

*** 22,32 **** /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! #pragma ident "%Z%%M% %I% %E% SMI" #include "ndievents.h" #include <sys/sunndi.h> #include <sys/ndi_impldefs.h> #include <sys/dditypes.h> --- 22,34 ---- /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ ! /* ! * Copyright (c) 2018, Joyent, Inc. ! */ #include "ndievents.h" #include <sys/sunndi.h> #include <sys/ndi_impldefs.h> #include <sys/dditypes.h>
*** 78,88 **** (uintptr_t)device->devi_node_name) == -1) { return (-1); } if (device->devi_node_state < DS_INITIALIZED) { ! strncpy(addr_str, '\0', sizeof ('\0')); } else { addr = device->devi_addr; if (mdb_readstr(addr_str, sizeof (addr_str), (uintptr_t)addr) == -1) { return (-1); --- 80,90 ---- (uintptr_t)device->devi_node_name) == -1) { return (-1); } if (device->devi_node_state < DS_INITIALIZED) { ! addr_str[0] = '\0'; } else { addr = device->devi_addr; if (mdb_readstr(addr_str, sizeof (addr_str), (uintptr_t)addr) == -1) { return (-1);