hostres_partition_tbl.c (302408) | hostres_partition_tbl.c (310899) |
---|---|
1/*- 2 * Copyright (c) 2005-2006 The FreeBSD Project 3 * All rights reserved. 4 * 5 * Author: Victor Cruceru <soc-victor@freebsd.org> 6 * 7 * Redistribution of this software and documentation and use in source and 8 * binary forms, with or without modification, are permitted provided that --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2005-2006 The FreeBSD Project 3 * All rights reserved. 4 * 5 * Author: Victor Cruceru <soc-victor@freebsd.org> 6 * 7 * Redistribution of this software and documentation and use in source and 8 * binary forms, with or without modification, are permitted provided that --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c 160341 2006-07-14 09:07:56Z harti $ | 29 * $FreeBSD: stable/11/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_partition_tbl.c 310899 2016-12-31 10:28:59Z ngie $ |
30 */ 31 32/* 33 * Host Resources MIB: hrPartitionTable implementation for SNMPd. 34 */ 35 36#include <sys/types.h> 37#include <sys/limits.h> --- 134 unchanged lines hidden (view full) --- 172 if (strcmp(map->id, chunk_name) == 0) 173 break; 174 175 if (map == NULL) { 176 /* new object - get a new index and create a map */ 177 178 if (next_partition_index > INT_MAX) { 179 /* Unrecoverable error - die clean and quicly*/ | 30 */ 31 32/* 33 * Host Resources MIB: hrPartitionTable implementation for SNMPd. 34 */ 35 36#include <sys/types.h> 37#include <sys/limits.h> --- 134 unchanged lines hidden (view full) --- 172 if (strcmp(map->id, chunk_name) == 0) 173 break; 174 175 if (map == NULL) { 176 /* new object - get a new index and create a map */ 177 178 if (next_partition_index > INT_MAX) { 179 /* Unrecoverable error - die clean and quicly*/ |
180 syslog(LOG_ERR, "%s: hrPartitionTable index wrap", | 180 syslog(LOG_ERR, "%s: hrPartitionTable index wrap", |
181 __func__); 182 errx(EX_SOFTWARE, "hrPartitionTable index wrap"); 183 } 184 185 if ((map = malloc(sizeof(*map))) == NULL) { 186 syslog(LOG_ERR, "hrPartitionTable: %s: %m", __func__); 187 return (NULL); 188 } --- 442 unchanged lines hidden --- | 181 __func__); 182 errx(EX_SOFTWARE, "hrPartitionTable index wrap"); 183 } 184 185 if ((map = malloc(sizeof(*map))) == NULL) { 186 syslog(LOG_ERR, "hrPartitionTable: %s: %m", __func__); 187 return (NULL); 188 } --- 442 unchanged lines hidden --- |