Changeset 133 in flair-src for trunk/lib/FlairCore/src/Widget_impl.cpp
- Timestamp:
- 02/09/17 11:08:31 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Widget_impl.cpp
r15 r133 24 24 #ifdef __XENO__ 25 25 #include <native/heap.h> 26 #else27 #include <errno.h>28 #include <cstring>29 26 #endif 30 27 … … 45 42 46 43 if (status != 0) { 47 printf("libxml2: rt_heap_free error (%s)\n", strerror(-status)); 44 char errorMsg[256]; 45 printf("libxml2: rt_heap_free error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 48 46 } 49 47 } … … 54 52 int status = rt_heap_alloc(&xml_heap, sz, TM_NONBLOCK, &ptr); 55 53 if (status != 0) { 56 printf("libxml2: rt_heap_alloc error (%s)\n", strerror(-status)); 54 char errorMsg[256]; 55 printf("libxml2: rt_heap_alloc error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 57 56 } 58 57 // Printf("alloc %x %i\n",ptr,sz); … … 106 105 int status = rt_heap_create(&xml_heap, tmp_name.c_str(), XML_HEAP, H_FIFO); 107 106 if (status != 0) { 108 self->Err("rt_heap_create error (%s)\n", strerror(-status)); 107 char errorMsg[256]; 108 self->Err("rt_heap_create error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 109 109 } 110 110 … … 188 188 #ifdef __XENO__ 189 189 int status; 190 char errorMsg[256]; 190 191 RT_HEAP_INFO info; 191 192 status = rt_heap_inquire(&xml_heap, &info); 192 193 if (status != 0) { 193 self->Err("rt_heap_inquire error (%s)\n", strerror (-status));194 self->Err("rt_heap_inquire error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 194 195 } 195 196 if (info.usedmem != 0) … … 198 199 status = rt_heap_delete(&xml_heap); 199 200 if (status != 0) { 200 self->Err("rt_heap_delete error (%s)\n", strerror (-status));201 self->Err("rt_heap_delete error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 201 202 } 202 203 #endif
Note:
See TracChangeset
for help on using the changeset viewer.