diff options
Diffstat (limited to 'src/local.c')
-rw-r--r-- | src/local.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/local.c b/src/local.c index 9c91f8b4..64ff7424 100644 --- a/src/local.c +++ b/src/local.c @@ -129,16 +129,16 @@ local_show_directory(GList *gl, const char *path, gboolean add_to_history) { fprintf(stderr, "stat failed for %s\n", fullpath); continue; } - strftime(date, 50, "%x", localtime(&st.st_mtime)); - strftime(time, 50, "%X", localtime(&st.st_mtime)); + strftime(date, sizeof(date), "%x", localtime(&st.st_mtime)); + strftime(time, sizeof(time), "%X", localtime(&st.st_mtime)); if (st.st_size > BPGB) - snprintf(size, 50, "%.1fG", (double)st.st_size / BPGB); + snprintf(size, sizeof(size), "%.1fG", (double)st.st_size / BPGB); else if (st.st_size > BPMB) - snprintf(size, 50, "%.1fM", (double)st.st_size / BPMB); + snprintf(size, sizeof(size), "%.1fM", (double)st.st_size / BPMB); else if (st.st_size > BPKB) - snprintf(size, 50, "%.1fK", (double)st.st_size / BPKB); + snprintf(size, sizeof(size), "%.1fK", (double)st.st_size / BPKB); else - snprintf(size, 50, "%lu", st.st_size); + snprintf(size, sizeof(size), "%lu", st.st_size); char perm[11]; int bits = 0; |