瀏覽代碼

convert to zalloc

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

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

@@ -105,12 +105,11 @@ static int isabus_probe ( struct root_device *rootdev ) {
105 105
 		      ioidx <= ISA_IOIDX_MAX ( driver ) ; ioidx++ ) {
106 106
 			/* Allocate struct isa_device */
107 107
 			if ( ! isa )
108
-				isa = malloc ( sizeof ( *isa ) );
108
+				isa = zalloc ( sizeof ( *isa ) );
109 109
 			if ( ! isa ) {
110 110
 				rc = -ENOMEM;
111 111
 				goto err;
112 112
 			}
113
-			memset ( isa, 0, sizeof ( *isa ) );
114 113
 			isa->driver = driver;
115 114
 			isa->ioaddr = ISA_IOADDR ( driver, ioidx );
116 115
 

Loading…
取消
儲存