Date: Wed, 8 Jun 2016 17:27:38 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r301653 - stable/10/usr.sbin/bsnmpd/tools/libbsnmptools Message-ID: <201606081727.u58HRci1029119@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Wed Jun 8 17:27:38 2016 New Revision: 301653 URL: https://svnweb.freebsd.org/changeset/base/301653 Log: MFC r299810: Correct function names that failed in error messages It should be calloc/strdup, not malloc Modified: stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c ============================================================================== --- stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun 8 17:24:57 2016 (r301652) +++ stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c Wed Jun 8 17:27:38 2016 (r301653) @@ -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/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c ============================================================================== --- stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Wed Jun 8 17:24:57 2016 (r301652) +++ stable/10/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Wed Jun 8 17:27:38 2016 (r301653) @@ -252,12 +252,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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606081727.u58HRci1029119>