Holger Lubitz 18 лет назад
Родитель
Сommit
aca232c973
1 измененных файлов: 1 добавлений и 2 удалений
  1. 1
    2
      src/core/hw.c

+ 1
- 2
src/core/hw.c Просмотреть файл

56
 	struct hw *hw;
56
 	struct hw *hw;
57
 
57
 
58
 	/* Allocate and initialise structure */
58
 	/* Allocate and initialise structure */
59
-	hw = malloc ( sizeof ( *hw ) );
59
+	hw = zalloc ( sizeof ( *hw ) );
60
 	if ( ! hw )
60
 	if ( ! hw )
61
 		return -ENOMEM;
61
 		return -ENOMEM;
62
-	memset ( hw, 0, sizeof ( *hw ) );
63
 	xfer_init ( &hw->xfer, &hw_xfer_operations, &hw->refcnt );
62
 	xfer_init ( &hw->xfer, &hw_xfer_operations, &hw->refcnt );
64
 	process_init ( &hw->process, hw_step, &hw->refcnt );
63
 	process_init ( &hw->process, hw_step, &hw->refcnt );
65
 
64
 

Загрузка…
Отмена
Сохранить