Author: ngie Date: Tue May 30 02:56:17 2017 New Revision: 319169 URL: https://svnweb.freebsd.org/changeset/base/319169
Log: MFC r319015: Use calloc instead of malloc + memset Modified: stable/11/tools/regression/geom_gpt/gctl_test_helper.c Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/regression/geom_gpt/gctl_test_helper.c ============================================================================== --- stable/11/tools/regression/geom_gpt/gctl_test_helper.c Tue May 30 02:53:00 2017 (r319168) +++ stable/11/tools/regression/geom_gpt/gctl_test_helper.c Tue May 30 02:56:17 2017 (r319169) @@ -87,10 +87,9 @@ parse(char *arg, char **param, char **value, int *len) return (EINVAL); if (*len <= 0 || *len > PATH_MAX) return (EINVAL); - *value = malloc(*len); + *value = calloc(*len, sizeof(char)); if (*value == NULL) return (ENOMEM); - memset(*value, 0, *len); if (equal != NULL) { if (strlen(equal) >= PATH_MAX) return (ENOMEM); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"