diff --git a/src/audio_call.c b/src/audio_call.c index f9670f7..106ebed 100644 --- a/src/audio_call.c +++ b/src/audio_call.c @@ -209,7 +209,7 @@ int device_set(ToxWindow *self, _Devices type, long int selection) uint8_t *s_type = type == input ? "input" : "output"; if ( selection < 0 || selection >= ASettins.device[type].size ) { - snprintf(str, sizeof(str), "Cannot set audio %s device: Invalid index: %d", s_type); + snprintf(str, sizeof(str), "Cannot set audio %s device: Invalid index: %ld", s_type, selection); line_info_add(self, NULL, NULL, NULL, str, SYS_MSG, 0, 0); return -1; } @@ -217,7 +217,7 @@ int device_set(ToxWindow *self, _Devices type, long int selection) ASettins.device[type].index = selection; if ( device_open(self, type) != 0 ) { - snprintf(str, sizeof(str), "Cannot open audio %s device index: %d", s_type); + snprintf(str, sizeof(str), "Cannot open audio %s device index: %ld", s_type, selection); line_info_add(self, NULL, NULL, NULL, str, SYS_MSG, 0, 0); return -1; } diff --git a/src/chat.c b/src/chat.c index a83a601..09926d9 100644 --- a/src/chat.c +++ b/src/chat.c @@ -260,7 +260,7 @@ static void chat_onFileSendRequest(ToxWindow *self, Tox *m, int32_t num, uint8_t } strcat(filename, d); - filename[len + d_len] = '\0';; + filename[len + d_len] = '\0'; if (count > 999) { errmsg = "Error saving file to disk.";