Mercurial > hg > toybox
comparison toys/posix/touch.c @ 701:7b316e3c0e11
Fix touch warnings (unused variables, failure to reserve space for null terminator).
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 16 Nov 2012 15:44:45 -0600 |
parents | ad6bff0c9169 |
children | 9fb5fe6eb13f |
comparison
equal
deleted
inserted
replaced
700:ad6bff0c9169 | 701:7b316e3c0e11 |
---|---|
44 | 44 |
45 /* function to return number of seconds since epoch till the given date */ | 45 /* function to return number of seconds since epoch till the given date */ |
46 time_t get_time_sec(char *date_input) | 46 time_t get_time_sec(char *date_input) |
47 { | 47 { |
48 int count_date_digit = 0; | 48 int count_date_digit = 0; |
49 char temp_date[12]; | 49 char mm[3]; |
50 char mm[2]; | 50 char year[5]; |
51 char dd[2]; | |
52 char hh[2]; | |
53 char ss[2]; | |
54 char year[4]; | |
55 time_t time_of_modify; | 51 time_t time_of_modify; |
56 struct tm t_yyyymmddhhss; | 52 struct tm t_yyyymmddhhss; |
57 | 53 |
58 while(date_input[count_date_digit] != '.') { | 54 while(date_input[count_date_digit] != '.') { |
59 if(count_date_digit < 4) | 55 if(count_date_digit < 4) |