summaryrefslogtreecommitdiff
path: root/usr/src/cmd/file/file.c
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2019-03-01 01:12:30 +0000
committerRichard Lowe <richlowe@richlowe.net>2019-04-24 16:59:38 +0000
commit9b8f194103574e93a8789067d2afccef3c586885 (patch)
treedc05dec2c81aeedfde60cfe248f0a3120ff6a983 /usr/src/cmd/file/file.c
parentb6a0e2cd4ce8d91fe9dc750c44e662d7c7e5fb8e (diff)
downloadillumos-joyent-9b8f194103574e93a8789067d2afccef3c586885.tar.gz
10476 file(1) could be smatch clean
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/cmd/file/file.c')
-rw-r--r--usr/src/cmd/file/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/src/cmd/file/file.c b/usr/src/cmd/file/file.c
index a2f00abc16..fa35a36406 100644
--- a/usr/src/cmd/file/file.c
+++ b/usr/src/cmd/file/file.c
@@ -853,7 +853,8 @@ notas:
for (i = 0; i < Max; /* null */)
if (fbuf[i] & 0200) {
IS_ascii = 0;
- if (fbuf[0] == '\100' && fbuf[1] == '\357') {
+ if ((fbuf[0] == '\100') &&
+ ((uchar_t)fbuf[1] == (uchar_t)'\357')) {
(void) printf(gettext("troff output\n"));
return;
}