From: Liam J. Foy Date: Fri, 28 Jan 2005 16:53:38 +0000 (+0000) Subject: Minor Patch X-Git-Tag: v2.0.1~9023 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/c967a161f6c862313271f5f997a715ade100543b Minor Patch - Fix data type - Remove unnecessary header - Instead of if..else.., just set as default behaviour --- diff --git a/bin/echo/echo.c b/bin/echo/echo.c index 85f686f31b..460725809d 100644 --- a/bin/echo/echo.c +++ b/bin/echo/echo.c @@ -33,29 +33,27 @@ * @(#) Copyright (c) 1989, 1993 The Regents of the University of California. All rights reserved. * @(#)echo.c 8.1 (Berkeley) 5/31/93 * $FreeBSD: src/bin/echo/echo.c,v 1.8.2.1 2001/08/01 02:33:32 obrien Exp $ - * $DragonFly: src/bin/echo/echo.c,v 1.6 2004/11/07 20:54:51 eirikn Exp $ + * $DragonFly: src/bin/echo/echo.c,v 1.7 2005/01/28 16:53:38 liamfoy Exp $ */ +#include #include -#include #include /* ARGSUSED */ int main(int argc __unused, char **argv) { - int nflag; + int nflag = 0; /* This utility may NOT do getopt(3) option parsing. */ if (*++argv && !strcmp(*argv, "-n")) { ++argv; nflag = 1; } - else - nflag = 0; while (argv[0]) { - int len = strlen(argv[0]); + size_t len = strlen(argv[0]); if (len >= 2 && !argv[1] && argv[0][len - 2] == '\\' && argv[0][len - 1] == 'c') { argv[0][len - 2] = '\0';