svn commit: r301654 - stable/9/usr.sbin/bsnmpd/tools/libbsnmptools

Garrett Cooper ngie at FreeBSD.org
Wed Jun 8 17:29:08 UTC 2016


Author: ngie
Date: Wed Jun  8 17:29:07 2016
New Revision: 301654
URL: https://svnweb.freebsd.org/changeset/base/301654

Log:
  MFstable/10 r301653:
  
  MFC r299810:
  
  Correct function names that failed in error messages
  
  It should be calloc/strdup, not malloc

Modified:
  stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
  stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/bsnmpd/   (props changed)

Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
==============================================================================
--- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c	Wed Jun  8 17:27:38 2016	(r301653)
+++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c	Wed Jun  8 17:29:07 2016	(r301654)
@@ -269,12 +269,12 @@ enum_pair_insert(struct enum_pairs *head
 	struct enum_pair *e_new;
 
 	if ((e_new = calloc(1, sizeof(struct enum_pair))) == NULL) {
-		syslog(LOG_ERR, "malloc() failed: %s", strerror(errno));
+		syslog(LOG_ERR, "calloc() failed: %s", strerror(errno));
 		return (-1);
 	}
 
 	if ((e_new->enum_str = strdup(enum_str)) == NULL) {
-		syslog(LOG_ERR, "malloc() failed: %s", strerror(errno));
+		syslog(LOG_ERR, "strdup() failed: %s", strerror(errno));
 		free(e_new);
 		return (-1);
 	}

Modified: stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
==============================================================================
--- stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c	Wed Jun  8 17:27:38 2016	(r301653)
+++ stable/9/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c	Wed Jun  8 17:29:07 2016	(r301654)
@@ -251,12 +251,12 @@ add_filename(struct snmp_toolinfo *snmpt
 	}
 
 	if ((fstring = strdup(filename)) == NULL) {
-		warnx("malloc() failed - %s", strerror(errno));
+		warnx("strdup() failed - %s", strerror(errno));
 		return (-1);
 	}
 
 	if ((entry = calloc(1, sizeof(struct fname))) == NULL) {
-		warnx("malloc() failed - %s", strerror(errno));
+		warnx("calloc() failed - %s", strerror(errno));
 		free(fstring);
 		return (-1);
 	}


More information about the svn-src-stable-9 mailing list