fix style and printf format errors in the frog command.
authorLuigi Rizzo <rizzo@icir.org>
Sat, 1 Apr 2006 18:18:20 +0000 (18:18 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Sat, 1 Apr 2006 18:18:20 +0000 (18:18 +0000)
(it's april first i guess...)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16886 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cli.c

diff --git a/cli.c b/cli.c
index 850cfb1..902dab3 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -258,12 +258,13 @@ static int handle_frog(int fd, int argc, char *argv[])
        double warpone = 75139293848.0;
        double warpfactor = 1.0;
 
-        if (argc > 2) return RESULT_SHOWUSAGE;
-       if ((argc > 1) && (sscanf(argv[1],"%lf",&warpfactor) != 1))
+        if (argc > 2)
+               return RESULT_SHOWUSAGE;
+       if (argc > 1 && sscanf(argv[1],"%lf",&warpfactor) != 1)
                 return RESULT_SHOWUSAGE;
 
         ast_cli(fd, "A frog in a blender with a base diameter of 3 inches going\n");
-        ast_cli(fd, "%.0lf RPM will be travelling at warp factor %lf,\n",
+        ast_cli(fd, "%.0f RPM will be travelling at warp factor %f,\n",
                warpfactor * warpfactor * warpfactor * warpone,warpfactor);
        ast_cli(fd,"based upon the Jacobsen Frog Corollary.\n");
        return RESULT_SUCCESS;