pointer issue
This commit is contained in:
@@ -72,12 +72,12 @@ void *receiver(void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void *output(void *arg) {
|
void *output(void *arg) {
|
||||||
char msg[30];
|
char *msg;
|
||||||
while (1) {
|
while (1) {
|
||||||
pthread_mutex_lock(&receivemut);
|
pthread_mutex_lock(&receivemut);
|
||||||
if (ListCount(receivelist) != 0) {
|
if (ListCount(receivelist) != 0) {
|
||||||
ListFirst(receivelist);
|
ListFirst(receivelist);
|
||||||
strcpy(msg, ListCurr(receivelist));
|
msg = ListCurr(receivelist);
|
||||||
ListRemove(receivelist);
|
ListRemove(receivelist);
|
||||||
printf("%s\n", (char*)msg);
|
printf("%s\n", (char*)msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user