浏览代码

convert to zalloc

tags/v0.9.3
Holger Lubitz 18 年前
父节点
当前提交
bb61774ee4
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1
    2
      src/arch/i386/drivers/net/undi.c

+ 1
- 2
src/arch/i386/drivers/net/undi.c 查看文件

72
 		return -ENOTTY;
72
 		return -ENOTTY;
73
 
73
 
74
 	/* Allocate UNDI device structure */
74
 	/* Allocate UNDI device structure */
75
-	undi = malloc ( sizeof ( *undi ) );
75
+	undi = zalloc ( sizeof ( *undi ) );
76
 	if ( ! undi )
76
 	if ( ! undi )
77
 		return -ENOMEM;
77
 		return -ENOMEM;
78
-	memset ( undi, 0, sizeof ( *undi ) );
79
 	pci_set_drvdata ( pci, undi );
78
 	pci_set_drvdata ( pci, undi );
80
 
79
 
81
 	/* Find/create our pixie */
80
 	/* Find/create our pixie */

正在加载...
取消
保存