test

Fork of mbed-dev by mbed official

Revision:
175:b96e65c34a4d
Parent:
168:e84263d55307
--- a/targets/TARGET_Realtek/TARGET_AMEBA/rtw_emac.cpp	Fri Sep 15 14:59:18 2017 +0100
+++ b/targets/TARGET_Realtek/TARGET_AMEBA/rtw_emac.cpp	Mon Oct 02 15:33:19 2017 +0100
@@ -217,11 +217,8 @@
 {
 
     if (_emac == NULL) {
-        _emac = new emac_interface_t();
-    	if (_emac == NULL) {//new emac_interface_t fail
-        	printf("emac initialization failed\r\n");
-		return NULL;
-    	}
+        _emac = (emac_interface_t*) malloc(sizeof(emac_interface_t));
+        MBED_ASSERT(_emac);
         _emac->hw = NULL;
         memcpy((void*)&_emac->ops, &wlan_emac_interface, sizeof(wlan_emac_interface));
     }