Module Name: src
Committed By: dholland
Date: Wed Mar 30 05:24:06 UTC 2011
Modified Files:
src/usr.sbin/ypbind: ypbind.c
Log Message:
Don't cast return value of malloc
To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/usr.sbin/ypbind/ypbind.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/ypbind/ypbind.c
diff -u src/usr.sbin/ypbind/ypbind.c:1.62 src/usr.sbin/ypbind/ypbind.c:1.63
--- src/usr.sbin/ypbind/ypbind.c:1.62 Wed Mar 30 05:20:59 2011
+++ src/usr.sbin/ypbind/ypbind.c Wed Mar 30 05:24:05 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: ypbind.c,v 1.62 2011/03/30 05:20:59 dholland Exp $ */
+/* $NetBSD: ypbind.c,v 1.63 2011/03/30 05:24:05 dholland Exp $ */
/*
* Copyright (c) 1992, 1993 Theo de Raadt <[email protected]>
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef LINT
-__RCSID("$NetBSD: ypbind.c,v 1.62 2011/03/30 05:20:59 dholland Exp $");
+__RCSID("$NetBSD: ypbind.c,v 1.63 2011/03/30 05:24:05 dholland Exp $");
#endif
#include <sys/param.h>
@@ -180,7 +180,7 @@
{
struct _dom_binding *ypdb;
- if ((ypdb = (struct _dom_binding *)malloc(sizeof *ypdb)) == NULL) {
+ if ((ypdb = malloc(sizeof *ypdb)) == NULL) {
yp_log(LOG_ERR, "makebinding");
exit(1);
}