diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-10-20 07:17:23 -0400 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-11-28 21:58:24 +0100 |
commit | bdbc1303cb6a3ddbbf7a4f6a546f8aa85775a13e (patch) | |
tree | 698fdfdfb21efb4626cc3f47d50cb3668dd25c69 | |
parent | 908c6b627f2c51f57db0dd3bff7b7577b14d0e71 (diff) | |
download | u-boot-imx-bdbc1303cb6a3ddbbf7a4f6a546f8aa85775a13e.zip u-boot-imx-bdbc1303cb6a3ddbbf7a4f6a546f8aa85775a13e.tar.gz u-boot-imx-bdbc1303cb6a3ddbbf7a4f6a546f8aa85775a13e.tar.bz2 |
cmd_date: constify
Many strings in this file need not be writable.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | common/cmd_date.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/cmd_date.c b/common/cmd_date.c index 8dbf16d..f0fa02a 100644 --- a/common/cmd_date.c +++ b/common/cmd_date.c @@ -31,7 +31,7 @@ DECLARE_GLOBAL_DATA_PTR; -const char *weekdays[] = { +static const char * const weekdays[] = { "Sun", "Mon", "Tues", "Wednes", "Thurs", "Fri", "Satur", }; @@ -41,7 +41,7 @@ const char *weekdays[] = { #define RELOC(a) a #endif -int mk_date (char *, struct rtc_time *); +int mk_date (const char *, struct rtc_time *); int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { @@ -106,7 +106,7 @@ int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* * simple conversion of two-digit string with error checking */ -static int cnvrt2 (char *str, int *valp) +static int cnvrt2 (const char *str, int *valp) { int val; @@ -131,7 +131,7 @@ static int cnvrt2 (char *str, int *valp) * Some basic checking for valid values is done, but this will not catch * all possible error conditions. */ -int mk_date (char *datestr, struct rtc_time *tmp) +int mk_date (const char *datestr, struct rtc_time *tmp) { int len, val; char *ptr; |