diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/calendar/ostern.c | 4 | ||||
-rw-r--r-- | usr.bin/dc/dc.c | 4 | ||||
-rw-r--r-- | usr.bin/dig/dighost.c | 7 | ||||
-rw-r--r-- | usr.bin/dig/lib/dns/rdata.c | 33 | ||||
-rw-r--r-- | usr.bin/dig/lib/dns/rdata/generic/tkey_249.c | 18 | ||||
-rw-r--r-- | usr.bin/dig/lib/dns/tsig.c | 22 | ||||
-rw-r--r-- | usr.bin/make/expandchildren.c | 14 | ||||
-rw-r--r-- | usr.bin/mg/file.c | 6 | ||||
-rw-r--r-- | usr.bin/rdist/docmd.c | 34 | ||||
-rw-r--r-- | usr.bin/snmp/snmpc.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 4 | ||||
-rw-r--r-- | usr.bin/telnet/telnet.c | 4 | ||||
-rw-r--r-- | usr.bin/tftp/tftpsubs.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-queue.c | 10 | ||||
-rw-r--r-- | usr.bin/tmux/window-copy.c | 4 |
15 files changed, 85 insertions, 87 deletions
diff --git a/usr.bin/calendar/ostern.c b/usr.bin/calendar/ostern.c index 536e7b8fb24..5eefb9c4324 100644 --- a/usr.bin/calendar/ostern.c +++ b/usr.bin/calendar/ostern.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ostern.c,v 1.9 2019/01/17 06:15:44 tedu Exp $ */ +/* $OpenBSD: ostern.c,v 1.10 2024/04/23 13:34:50 jsg Exp $ */ /* * Copyright (c) 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. @@ -62,7 +62,7 @@ easter(int year) /* 0 ... abcd, NOT since 1900 */ e_q++; if (e_n == 4) - e_q += 31; + e_q += 31; #if DEBUG printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n", diff --git a/usr.bin/dc/dc.c b/usr.bin/dc/dc.c index a8b598c2439..204fc356eec 100644 --- a/usr.bin/dc/dc.c +++ b/usr.bin/dc/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.20 2017/12/06 13:48:05 otto Exp $ */ +/* $OpenBSD: dc.c,v 1.21 2024/04/23 13:34:50 jsg Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek <otto@drijf.net> @@ -110,7 +110,7 @@ dc_main(int argc, char *argv[]) * BSD and Solaris dc(1) continue with stdin after processing * the file given as the argument. We follow GNU dc(1). */ - return (0); + return (0); } src_setstream(&src, stdin); diff --git a/usr.bin/dig/dighost.c b/usr.bin/dig/dighost.c index 2d2a52c86e2..c62ee08573e 100644 --- a/usr.bin/dig/dighost.c +++ b/usr.bin/dig/dighost.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.37 2020/12/21 11:41:08 florian Exp $ */ +/* $Id: dighost.c,v 1.38 2024/04/23 13:34:50 jsg Exp $ */ /*! \file * \note @@ -3643,15 +3643,14 @@ recv_done(isc_task_t *task, isc_event_t *event) { } else { if (msg->rcode == dns_rcode_noerror || l->origin == NULL) { - - dighost_received(b->used, &sevent->address, query); + dighost_received(b->used, &sevent->address, query); } if (!query->lookup->ns_search_only) query->lookup->pending = 0; if (!query->lookup->ns_search_only || query->lookup->trace_root || docancel) { - dns_message_destroy(&msg); + dns_message_destroy(&msg); cancel_lookup(l); } diff --git a/usr.bin/dig/lib/dns/rdata.c b/usr.bin/dig/lib/dns/rdata.c index acd7caa50db..395f3cf1262 100644 --- a/usr.bin/dig/lib/dns/rdata.c +++ b/usr.bin/dig/lib/dns/rdata.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.35 2022/07/03 12:07:52 florian Exp $ */ +/* $Id: rdata.c,v 1.36 2024/04/23 13:34:50 jsg Exp $ */ /*! \file */ @@ -1430,25 +1430,24 @@ byte_btoa(int c, isc_buffer_t *target, struct state *state) { tr.base[0] = 'z'; isc_buffer_add(target, 1); } else { - register int tmp = 0; - register int32_t tmpword = word; - - if (tmpword < 0) { - /* - * Because some don't support u_long. - */ - tmp = 32; - tmpword -= (int32_t)(85 * 85 * 85 * 85 * 32); - } - if (tmpword < 0) { - tmp = 64; - tmpword -= (int32_t)(85 * 85 * 85 * 85 * 32); - } + register int tmp = 0; + register int32_t tmpword = word; + + if (tmpword < 0) { + /* + * Because some don't support u_long. + */ + tmp = 32; + tmpword -= (int32_t)(85 * 85 * 85 * 85 * 32); + } + if (tmpword < 0) { + tmp = 64; + tmpword -= (int32_t)(85 * 85 * 85 * 85 * 32); + } if (tr.length < 5) return (ISC_R_NOSPACE); tr.base[0] = atob_digits[(tmpword / - (int32_t)(85 * 85 * 85 * 85)) - + tmp]; + (int32_t)(85 * 85 * 85 * 85)) + tmp]; tmpword %= (int32_t)(85 * 85 * 85 * 85); tr.base[1] = atob_digits[tmpword / (85 * 85 * 85)]; tmpword %= (85 * 85 * 85); diff --git a/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c b/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c index 97fab1f5f0d..b8fb9e8ddd5 100644 --- a/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c +++ b/usr.bin/dig/lib/dns/rdata/generic/tkey_249.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tkey_249.c,v 1.13 2020/09/14 08:40:43 florian Exp $ */ +/* $Id: tkey_249.c,v 1.14 2024/04/23 13:34:50 jsg Exp $ */ /* * Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley. @@ -127,18 +127,18 @@ totext_tkey(ARGS_TOTEXT) { */ REQUIRE(n <= sr.length); if (n != 0U) { - dr = sr; - dr.length = n; - if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) - RETERR(isc_str_tobuffer(" (", target)); - RETERR(isc_str_tobuffer(tctx->linebreak, target)); + dr = sr; + dr.length = n; + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) + RETERR(isc_str_tobuffer(" (", target)); + RETERR(isc_str_tobuffer(tctx->linebreak, target)); if (tctx->width == 0) /* No splitting */ RETERR(isc_base64_totext(&dr, 60, "", target)); else RETERR(isc_base64_totext(&dr, tctx->width - 2, - tctx->linebreak, target)); - if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) - RETERR(isc_str_tobuffer(" )", target)); + tctx->linebreak, target)); + if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) + RETERR(isc_str_tobuffer(" )", target)); } return (ISC_R_SUCCESS); } diff --git a/usr.bin/dig/lib/dns/tsig.c b/usr.bin/dig/lib/dns/tsig.c index 795944c0647..57658a91b45 100644 --- a/usr.bin/dig/lib/dns/tsig.c +++ b/usr.bin/dig/lib/dns/tsig.c @@ -15,7 +15,7 @@ */ /* - * $Id: tsig.c,v 1.14 2020/09/14 08:40:43 florian Exp $ + * $Id: tsig.c,v 1.15 2024/04/23 13:34:50 jsg Exp $ */ /*! \file */ @@ -295,8 +295,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (dns_name_equal(algorithm, DNS_TSIG_HMACSHA224_NAME)) { if (secret != NULL) { @@ -308,8 +308,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (dns_name_equal(algorithm, DNS_TSIG_HMACSHA256_NAME)) { if (secret != NULL) { @@ -321,8 +321,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (dns_name_equal(algorithm, DNS_TSIG_HMACSHA384_NAME)) { if (secret != NULL) { @@ -334,8 +334,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (dns_name_equal(algorithm, DNS_TSIG_HMACSHA512_NAME)) { if (secret != NULL) { @@ -347,8 +347,8 @@ dns_tsigkey_create(dns_name_t *name, dns_name_t *algorithm, DNS_KEYOWNER_ENTITY, DNS_KEYPROTO_DNSSEC, &b, &dstkey); - if (result != ISC_R_SUCCESS) - return (result); + if (result != ISC_R_SUCCESS) + return (result); } } else if (length > 0) return (DNS_R_BADALG); diff --git a/usr.bin/make/expandchildren.c b/usr.bin/make/expandchildren.c index a259c30c189..e2939c26979 100644 --- a/usr.bin/make/expandchildren.c +++ b/usr.bin/make/expandchildren.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expandchildren.c,v 1.3 2023/09/04 11:35:11 espie Exp $ */ +/* $OpenBSD: expandchildren.c,v 1.4 2024/04/23 13:34:50 jsg Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* @@ -133,13 +133,13 @@ ExpandVarChildren(LstNode after, GNode *cgn, GNode *pgn) cp2+=2; else cp2++; - } + } - if (cp2 != start) { - /* Stuff left over -- add it to the list too. */ - gn = Targ_FindNodei(start, cp2, TARG_CREATE); - Lst_AtEnd(&members, gn); - } + if (cp2 != start) { + /* Stuff left over -- add it to the list too. */ + gn = Targ_FindNodei(start, cp2, TARG_CREATE); + Lst_AtEnd(&members, gn); + } } /* Add all elements of the members list to the parent node. */ while ((gn = Lst_DeQueue(&members)) != NULL) { diff --git a/usr.bin/mg/file.c b/usr.bin/mg/file.c index d710935930e..b01e8181cc1 100644 --- a/usr.bin/mg/file.c +++ b/usr.bin/mg/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.103 2023/03/08 04:43:11 guenther Exp $ */ +/* $OpenBSD: file.c,v 1.104 2024/04/23 13:34:50 jsg Exp $ */ /* This file is in the public domain. */ @@ -406,8 +406,8 @@ retry: dobeep(); ewprintf("Could not allocate %d bytes", newsize); - s = FIOERR; - goto endoffile; + s = FIOERR; + goto endoffile; } bcopy(line, cp, linesize); free(line); diff --git a/usr.bin/rdist/docmd.c b/usr.bin/rdist/docmd.c index 5d0279bcf62..f3aaaddcddb 100644 --- a/usr.bin/rdist/docmd.c +++ b/usr.bin/rdist/docmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: docmd.c,v 1.35 2022/01/28 06:18:41 guenther Exp $ */ +/* $OpenBSD: docmd.c,v 1.36 2024/04/23 13:34:50 jsg Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -485,31 +485,31 @@ doarrow(struct cmd *cmd, char **filev) * b) basename of destination in "install" directive is "." * (e.g. install /tmp/.;) * c) name on left side of -> directive is a directory on local system. - * - * We need 2 destdir flags (destdir and ddir) because single directory - * source is handled differently. In this case, ddir is 0 (which - * tells install() not to send DIRTARGET directive to remote rdistd) - * and destdir is 1 (which tells remfilename() how to build the FILE - * variables correctly). In every other case, destdir and ddir will - * have the same value. + * + * We need 2 destdir flags (destdir and ddir) because single directory + * source is handled differently. In this case, ddir is 0 (which + * tells install() not to send DIRTARGET directive to remote rdistd) + * and destdir is 1 (which tells remfilename() how to build the FILE + * variables correctly). In every other case, destdir and ddir will + * have the same value. */ - ddir = files->n_next != NULL; /* destination is a directory */ + ddir = files->n_next != NULL; /* destination is a directory */ if (!ddir) { struct stat s; - int isadir = 0; + int isadir = 0; if (lstat(files->n_name, &s) == 0) - isadir = S_ISDIR(s.st_mode); - if (!isadir && sc->sc_name && *sc->sc_name) - ddir = !strcmp(xbasename(sc->sc_name),"."); - destdir = isadir | ddir; - } else - destdir = ddir; + isadir = S_ISDIR(s.st_mode); + if (!isadir && sc->sc_name && *sc->sc_name) + ddir = !strcmp(xbasename(sc->sc_name),"."); + destdir = isadir | ddir; + } else + destdir = ddir; debugmsg(DM_MISC, "Debug files->n_next= %p, destdir=%d, ddir=%d", files->n_next, destdir, ddir); - + if (!sc->sc_name || !*sc->sc_name) { destdir = 0; ddir = 0; diff --git a/usr.bin/snmp/snmpc.c b/usr.bin/snmp/snmpc.c index 3930c919274..5f4596eb324 100644 --- a/usr.bin/snmp/snmpc.c +++ b/usr.bin/snmp/snmpc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: snmpc.c,v 1.40 2022/12/26 19:16:03 jmc Exp $ */ +/* $OpenBSD: snmpc.c,v 1.41 2024/04/23 13:34:50 jsg Exp $ */ /* * Copyright (c) 2019 Martijn van Duren <martijn@openbsd.org> @@ -233,7 +233,7 @@ main(int argc, char *argv[]) errx(1, "-3K"); } privkeylevel = USM_KEY_LOCALIZED; - break; + break; case 'k': authkey = snmpc_hex2bin(optarg, &authkeylen); if (authkey == NULL) { diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index 850372cba0d..8ff922852b5 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.366 2024/01/11 01:45:36 djm Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.367 2024/04/23 13:34:50 jsg Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -609,7 +609,7 @@ get_hostfile_hostname_ipaddr(char *hostname, struct sockaddr *hostaddr, if (options.proxy_command == NULL) { if (getnameinfo(hostaddr, hostaddr->sa_len, ntop, sizeof(ntop), NULL, 0, NI_NUMERICHOST) != 0) - fatal_f("getnameinfo failed"); + fatal_f("getnameinfo failed"); *hostfile_ipaddr = put_host_port(ntop, port); } else { *hostfile_ipaddr = xstrdup("<no hostip for proxy " diff --git a/usr.bin/telnet/telnet.c b/usr.bin/telnet/telnet.c index 05ca9905e6f..eb4d03a6af6 100644 --- a/usr.bin/telnet/telnet.c +++ b/usr.bin/telnet/telnet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: telnet.c,v 1.36 2019/07/11 03:54:27 deraadt Exp $ */ +/* $OpenBSD: telnet.c,v 1.37 2024/04/23 13:34:51 jsg Exp $ */ /* $NetBSD: telnet.c,v 1.7 1996/02/28 21:04:15 thorpej Exp $ */ /* @@ -1359,7 +1359,7 @@ env_opt_add(char *ep) opt_add(c); } if ((ep = vp)) { - opt_add(NEW_ENV_VALUE); + opt_add(NEW_ENV_VALUE); vp = NULL; } else break; diff --git a/usr.bin/tftp/tftpsubs.c b/usr.bin/tftp/tftpsubs.c index 85c2e372849..69bc0c14c59 100644 --- a/usr.bin/tftp/tftpsubs.c +++ b/usr.bin/tftp/tftpsubs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpsubs.c,v 1.15 2012/05/01 04:23:21 gsoares Exp $ */ +/* $OpenBSD: tftpsubs.c,v 1.16 2024/04/23 13:34:51 jsg Exp $ */ /* $NetBSD: tftpsubs.c,v 1.3 1994/12/08 09:51:31 jtc Exp $ */ /* @@ -165,7 +165,7 @@ read_ahead(FILE *file, int convert, int segment_size) newline = 1; } } - *p++ = c; + *p++ = c; } b->counter = (int)(p - dp->th_data); } diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c index 3ce516803f0..623535a1208 100644 --- a/usr.bin/tmux/cmd-queue.c +++ b/usr.bin/tmux/cmd-queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-queue.c,v 1.115 2023/09/15 06:31:49 nicm Exp $ */ +/* $OpenBSD: cmd-queue.c,v 1.116 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2013 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -806,10 +806,10 @@ cmdq_running(struct client *c) struct cmdq_list *queue = cmdq_get(c); if (queue->item == NULL) - return (NULL); - if (queue->item->flags & CMDQ_WAITING) - return (NULL); - return (queue->item); + return (NULL); + if (queue->item->flags & CMDQ_WAITING) + return (NULL); + return (queue->item); } /* Print a guard line. */ diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c index 3ae46cdc986..6c43d4010d0 100644 --- a/usr.bin/tmux/window-copy.c +++ b/usr.bin/tmux/window-copy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-copy.c,v 1.347 2024/03/26 10:20:20 nicm Exp $ */ +/* $OpenBSD: window-copy.c,v 1.348 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -4694,7 +4694,7 @@ window_copy_get_selection(struct window_mode_entry *wme, size_t *len) if (keys == MODEKEY_EMACS || lastex <= ey_last) { if (~grid_get_line(data->backing->grid, ey)->flags & GRID_LINE_WRAPPED || lastex != ey_last) - off -= 1; + off -= 1; } *len = off; return (buf); |