summaryrefslogtreecommitdiff
path: root/usr/src/cmd/echo
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2018-12-19 18:10:14 +0000
committerJohn Levon <john.levon@joyent.com>2019-03-08 15:59:03 +0000
commitbc54f855e0de1e590115101c80f152a20722cfb0 (patch)
tree27cff7229dcd40fe061477176fc30ca00a6656f7 /usr/src/cmd/echo
parent8f5edf1f887948e6be5982cbe7f196909927af91 (diff)
downloadillumos-gate-bc54f855e0de1e590115101c80f152a20722cfb0.tar.gz
10120 smatch indenting fixes for usr/src/cmd
Reviewed by: Gergő Doma <domag02@gmail.com> Reviewed by: Jason King <jason.brian.king@gmail.com> Portions contributed by: Joyce McIntosh <joyce.mcintosh@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/cmd/echo')
-rw-r--r--usr/src/cmd/echo/echo.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/usr/src/cmd/echo/echo.c b/usr/src/cmd/echo/echo.c
index ebd8e3868b..e9f9027203 100644
--- a/usr/src/cmd/echo/echo.c
+++ b/usr/src/cmd/echo/echo.c
@@ -25,6 +25,9 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
#include <stdio.h>
#include <stdlib.h>
@@ -55,16 +58,16 @@ main(int argc, char *argv[])
for (i = 1; i <= argc; i++) {
for (cp = argv[i], ep = cp + (int)strlen(cp);
cp < ep; cp += b_len) {
- if ((b_len = mbtowc(&wc, cp, MB_CUR_MAX)) <= 0) {
- (void) putchar(*cp);
- b_len = 1;
- continue;
- }
+ if ((b_len = mbtowc(&wc, cp, MB_CUR_MAX)) <= 0) {
+ (void) putchar(*cp);
+ b_len = 1;
+ continue;
+ }
- if (wc != '\\') {
- (void) putwchar(wc);
- continue;
- }
+ if (wc != '\\') {
+ (void) putwchar(wc);
+ continue;
+ }
cp += b_len;
b_len = 1;