diff options
-rw-r--r-- | server.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -386,7 +386,7 @@ int read_file(int fd, char buffer[FILE_READ_SIZE], int station_num) { if (bytes_read == 0) { // printf("end of file, restarting\n"); pthread_t send_announce_thread; - pthread_create(&send_announce_thread, NULL, send_announce_routine, (void *) &station_num); + pthread_create(&send_announce_thread, NULL, send_announce_routine, station_num); if (lseek(fd, 0, SEEK_SET) == -1) { @@ -912,7 +912,7 @@ void update_user_station(int tcpfd, int stationNum) { */ void *send_announce_routine(void *arg) { // unpack arg - int station_num = * (int *) arg; + int station_num = (int) arg; // send the announce messages for (int i = 0; i < max_active_users; i++) { |