diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-09-08 11:35:00 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-09-08 11:35:00 +0000 |
commit | 59a0703a940438d24a8cd9911a57711b8028c496 (patch) | |
tree | 816119c979bf679b1cef812f7c2f36f2d743800a /usr/src/lib/efcode/engine/interactive.c | |
parent | 538446bd297154cf5d4db74adf78dfa23d05df0c (diff) | |
parent | 93d26c05275be2c44aedd16705237484fc0a0990 (diff) | |
download | illumos-joyent-59a0703a940438d24a8cd9911a57711b8028c496.tar.gz |
[illumos-gate merge]
commit 93d26c05275be2c44aedd16705237484fc0a0990
13015 fruaccess: comparison between pointer and zero character constant
commit ba12489a763ade223e478c59fdc4cb752fcba568
13011 tsalarm: '*' in boolean context, suggest '&&' instead
commit 09e6639baaf32231365cb9895bf1e0ea006a2a60
12885 efcode: smatch and build errors
commit e4af2f17fac5babc25d094f1bf22dd06515f66c7
13104 zfs: offset_t is signed and can not be > MAXOFFSET_T
commit 7aaede4825001926ae223b8c47ef9e4d0d6021ba
12974 libc: left shift of negative value
commit 712669c9fa9278704a4ccefe1d96acaf29397d36
13103 zfs: zvol_strategy() warn: unsigned 'off' is never less than zero
commit e075c017fe4c71cde62297bcc90d3411c0f4ad1d
12512 dispadmin.1m manpage is missing \fB \fR around FX
commit 9b0881404678e5235132f9320785c3f5ce6e71f6
13087 zfs: zfs_ereport_post() and zfs_ereport_start() return values are ignored
commit 5365b8a5984eca60a3cedc7f9f738e51fb056bec
12936 bhyve vlapic needs ability to bypass isrvec_stk
Diffstat (limited to 'usr/src/lib/efcode/engine/interactive.c')
-rw-r--r-- | usr/src/lib/efcode/engine/interactive.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/usr/src/lib/efcode/engine/interactive.c b/usr/src/lib/efcode/engine/interactive.c index 398f52a686..942f8dcd13 100644 --- a/usr/src/lib/efcode/engine/interactive.c +++ b/usr/src/lib/efcode/engine/interactive.c @@ -24,8 +24,6 @@ * All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -104,7 +102,7 @@ defer(fcode_env_t *env) PUSH(DS, (fstack_t)&crash_ptr); name = parse_a_string(env, &len); make_common_access(env, name, len, 1, - env->instance_mode, &noop, &noop, &set_defer_actions); + env->instance_mode, &noop, &noop, &set_defer_actions); } void @@ -343,7 +341,7 @@ load_file(fcode_env_t *env) if (fd < 0) { forth_perror(env, "Can't open '%s'", name); } - fstat(fd, &buf); + (void) fstat(fd, &buf); len = buf.st_size; buffer = MALLOC(len); if (buffer == 0) @@ -352,7 +350,7 @@ load_file(fcode_env_t *env) if ((n = read(fd, buffer, len)) < 0) forth_perror(env, "read error '%s'", name); - close(fd); + (void) close(fd); PUSH(DS, (fstack_t)buffer); PUSH(DS, (fstack_t)n); } @@ -504,18 +502,18 @@ read_line(fcode_env_t *env) struct termio termio, savetermio; if (!isatty(fileno(stdin))) { - fgets(buf, sizeof (buf), stdin); + (void) fgets(buf, sizeof (buf), stdin); push_string(env, buf, strlen(buf)); return; } printf(prompt_string); fflush(stdout); - ioctl(fileno(stdin), TCGETA, &termio); + (void) ioctl(fileno(stdin), TCGETA, &termio); savetermio = termio; termio.c_lflag &= ~(ICANON|ECHO|ECHOE|IEXTEN); termio.c_cc[VTIME] = 0; termio.c_cc[VMIN] = 1; - ioctl(fileno(stdin), TCSETA, &termio); + (void) ioctl(fileno(stdin), TCSETA, &termio); my_line = cur_line = num_lines; save_buf[0] = '\0'; for (cursor = eol = buf; ; ) { @@ -627,7 +625,7 @@ read_line(fcode_env_t *env) redraw_line(env, buf, cursor, eol, save_line, save_line + save_cursor, save_line + len); - strcpy(buf, save_line); + (void) strcpy(buf, save_line); eol = buf + len; cursor = buf + save_cursor; continue; @@ -636,7 +634,7 @@ read_line(fcode_env_t *env) p = history_lines[cur_line]; len = strlen(p); redraw_line(env, buf, cursor, eol, p, p, p + len); - strcpy(buf, history_lines[cur_line]); + (void) strcpy(buf, history_lines[cur_line]); cursor = buf; eol = buf + len; continue; @@ -753,7 +751,7 @@ read_line(fcode_env_t *env) break; } add_line_to_history(env, buf); - ioctl(fileno(stdin), TCSETA, &savetermio); + (void) ioctl(fileno(stdin), TCSETA, &savetermio); push_string(env, buf, strlen(buf)); } @@ -763,7 +761,7 @@ set_prompt(fcode_env_t *env) char *prompt; if ((prompt = parse_a_string(env, NULL)) != NULL) - strncpy(prompt_string, prompt, sizeof (prompt_string)); + (void) strncpy(prompt_string, prompt, sizeof (prompt_string)); } #pragma init(_init) |