summaryrefslogtreecommitdiffstats
path: root/misc-utils
diff options
context:
space:
mode:
authorSami Kerola2013-04-28 13:47:55 +0200
committerSami Kerola2013-05-26 10:59:18 +0200
commit7c0726d7e60aa3e623d863cd1228bbaffea8b27e (patch)
treea911252fff289faed61977b90161bf09f206b718 /misc-utils
parentcal: simplify calendar reformat calculations (diff)
downloadkernel-qcow2-util-linux-7c0726d7e60aa3e623d863cd1228bbaffea8b27e.tar.gz
kernel-qcow2-util-linux-7c0726d7e60aa3e623d863cd1228bbaffea8b27e.tar.xz
kernel-qcow2-util-linux-7c0726d7e60aa3e623d863cd1228bbaffea8b27e.zip
cal: remove unnecessary initializations
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/cal.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/misc-utils/cal.c b/misc-utils/cal.c
index a89ca7648..03f62653b 100644
--- a/misc-utils/cal.c
+++ b/misc-utils/cal.c
@@ -437,9 +437,6 @@ void headers_init(void)
int i, wd;
char *cur_dh = day_headings, *cur_j_dh = j_day_headings;
- strcpy(day_headings, "");
- strcpy(j_day_headings, "");
-
for (i = 0; i < DAYS_IN_WEEK; i++) {
ssize_t space_left;
wd = (i + weekstart) % DAYS_IN_WEEK;
@@ -584,8 +581,6 @@ j_yearly(int day, int year) {
for (i = 0; i < MONTHS_IN_YEAR; i++)
day_array(day, i + 1, year, days[i]);
- memset(lineout, ' ', sizeof(lineout) - 1);
- lineout[sizeof(lineout) - 1] = '\0';
for (month = 0; month < MONTHS_IN_YEAR; month += 2) {
center(full_month[month], J_WEEK_LEN-1, J_HEAD_SEP+1);
center(full_month[month + 1], J_WEEK_LEN-1, 0);
@@ -622,8 +617,6 @@ yearly(int day, int year) {
for (i = 0; i < MONTHS_IN_YEAR; i++)
day_array(day, i + 1, year, days[i]);
- memset(lineout, ' ', sizeof(lineout) - 1);
- lineout[sizeof(lineout) - 1] = '\0';
for (month = 0; month < MONTHS_IN_YEAR; month += 3) {
center(full_month[month], WEEK_LEN-1, HEAD_SEP+1);
center(full_month[month + 1], WEEK_LEN-1, HEAD_SEP+1);