A small library that's provide helpers for programmers

Dependents:   PYRN

Revision:
1:ee7a5f05513d
Parent:
0:11d8781f1013
Child:
2:6cc4c56940af
--- a/MyThread.cpp	Mon Feb 16 16:30:36 2015 +0000
+++ b/MyThread.cpp	Tue Feb 17 11:55:34 2015 +0000
@@ -1,5 +1,6 @@
 
-#include "MyThreads.h"
+#include "MyThread.h"
+#include "MyLibc.h"
 
 void MainTrampoline(void const *args){
     MyThread *mt = (MyThread*) args;
@@ -9,8 +10,7 @@
 }
 
 MyThread::MyThread(const char* name){
-    tName = (const char*) malloc (sizeof(char)*strlen(name)+1);
-    strcpy((char*)tName,name);
+    tName = strdup(name);
 }
 
 MyThread::~MyThread() {