]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_test.c
arm: mx5: clock: fix PLL_FREQ_MIN() calculation
[karo-tx-uboot.git] / common / cmd_test.c
index d886f893c7ed7cf444b47adf93c87a4b3bc75a5f..bacc3684069b89f39b899cb21a19f33379328bbe 100644 (file)
@@ -2,43 +2,36 @@
  * Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/*
+ * Define _STDBOOL_H here to avoid macro expansion of true and false.
+ * If the future code requires macro true or false, remove this define
+ * and undef true and false before U_BOOT_CMD. This define and comment
+ * shall be removed if change to U_BOOT_CMD is made to take string
+ * instead of stringifying it.
  */
+#define _STDBOOL_H
 
 #include <common.h>
 #include <command.h>
 
-int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
-       char **ap;
+       char * const *ap;
        int left, adv, expr, last_expr, neg, last_cmp;
 
        /* args? */
        if (argc < 3)
                return 1;
 
-#if 0
+#ifdef DEBUG
        {
-               printf("test:");
+               debug("test(%d):", argc);
                left = 1;
                while (argv[left])
-                       printf(" %s", argv[left++]);
+                       debug(" '%s'", argv[left++]);
        }
 #endif
 
@@ -150,7 +143,7 @@ U_BOOT_CMD(
        "[args..]"
 );
 
-int do_false(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_false(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        return 1;
 }
@@ -161,7 +154,7 @@ U_BOOT_CMD(
        NULL
 );
 
-int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        return 0;
 }