diff options
Diffstat (limited to 'apps/gui/statusbar.c')
-rw-r--r-- | apps/gui/statusbar.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index 47dcb4ead1..5e215090f5 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -617,7 +617,7 @@ static void gui_statusbar_time(struct screen * display, struct tm *time) | |||
617 | snprintf(buffer, sizeof(buffer), "%02d:%02d", hour, minute); | 617 | snprintf(buffer, sizeof(buffer), "%02d:%02d", hour, minute); |
618 | } | 618 | } |
619 | else { | 619 | else { |
620 | strncpy(buffer, "--:--", sizeof buffer); | 620 | strlcpy(buffer, "--:--", sizeof(buffer)); |
621 | } | 621 | } |
622 | display->setfont(FONT_SYSFIXED); | 622 | display->setfont(FONT_SYSFIXED); |
623 | display->getstringsize(buffer, &width, &height); | 623 | display->getstringsize(buffer, &width, &height); |
@@ -626,7 +626,6 @@ static void gui_statusbar_time(struct screen * display, struct tm *time) | |||
626 | STATUSBAR_Y_POS, buffer); | 626 | STATUSBAR_Y_POS, buffer); |
627 | } | 627 | } |
628 | display->setfont(FONT_UI); | 628 | display->setfont(FONT_UI); |
629 | |||
630 | } | 629 | } |
631 | #endif | 630 | #endif |
632 | 631 | ||
@@ -758,14 +757,14 @@ static void gui_statusbar_icon_recording_info(struct screen * display) | |||
758 | if (global_settings.rec_source == AUDIO_SRC_SPDIF) | 757 | if (global_settings.rec_source == AUDIO_SRC_SPDIF) |
759 | { | 758 | { |
760 | /* Can't measure S/PDIF sample rate on Archos/Sim yet */ | 759 | /* Can't measure S/PDIF sample rate on Archos/Sim yet */ |
761 | strncpy(buffer, "--", sizeof(buffer)); | 760 | strlcpy(buffer, "--", sizeof(buffer)); |
762 | } | 761 | } |
763 | else | 762 | else |
764 | #endif /* HAVE_SPDIF_IN */ | 763 | #endif /* HAVE_SPDIF_IN */ |
765 | { | 764 | { |
766 | static char const * const freq_strings[12] = | 765 | static char const * const freq_strings[12] = |
767 | { "44", "48", "32", "22", "24", "16" }; | 766 | { "44", "48", "32", "22", "24", "16" }; |
768 | strncpy(buffer, freq_strings[global_settings.rec_frequency], | 767 | strlcpy(buffer, freq_strings[global_settings.rec_frequency], |
769 | sizeof(buffer)); | 768 | sizeof(buffer)); |
770 | } | 769 | } |
771 | 770 | ||