瀏覽代碼

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 年之前
父節點
當前提交
a4bea78974
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1
    2
      src/drivers/bus/eisa.c

+ 1
- 2
src/drivers/bus/eisa.c 查看文件

@@ -106,12 +106,11 @@ static int eisabus_probe ( struct root_device *rootdev ) {
106 106
 	for ( slot = EISA_MIN_SLOT ; slot <= EISA_MAX_SLOT ; slot++ ) {
107 107
 		/* Allocate struct eisa_device */
108 108
 		if ( ! eisa )
109
-			eisa = malloc ( sizeof ( *eisa ) );
109
+			eisa = zalloc ( sizeof ( *eisa ) );
110 110
 		if ( ! eisa ) {
111 111
 			rc = -ENOMEM;
112 112
 			goto err;
113 113
 		}
114
-		memset ( eisa, 0, sizeof ( *eisa ) );
115 114
 		eisa->slot = slot;
116 115
 		eisa->ioaddr = EISA_SLOT_BASE ( eisa->slot );
117 116
 

Loading…
取消
儲存