From e6c7c102cf5d9891f32552a42895134a59937045 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 23 Apr 2024 13:34:50 +0000 Subject: [PATCH] correct indentation; no functional change ok tb@ --- bin/csh/func.c | 6 +-- bin/ed/buf.c | 6 +-- bin/ksh/c_ksh.c | 6 +-- bin/ksh/edit.c | 4 +- bin/pax/buf_subs.c | 4 +- sbin/fsck_ext2fs/inode.c | 4 +- sbin/growfs/growfs.c | 6 +-- sbin/ifconfig/ifconfig.c | 4 +- sbin/ncheck_ffs/ncheck_ffs.c | 4 +- sbin/ping/ping.c | 4 +- usr.bin/calendar/ostern.c | 4 +- usr.bin/dc/dc.c | 4 +- usr.bin/dig/dighost.c | 7 ++-- usr.bin/dig/lib/dns/rdata.c | 33 +++++++-------- usr.bin/dig/lib/dns/rdata/generic/tkey_249.c | 18 ++++---- usr.bin/dig/lib/dns/tsig.c | 22 +++++----- usr.bin/make/expandchildren.c | 14 +++---- usr.bin/mg/file.c | 6 +-- usr.bin/rdist/docmd.c | 34 +++++++-------- usr.bin/snmp/snmpc.c | 4 +- usr.bin/ssh/sshconnect.c | 4 +- usr.bin/telnet/telnet.c | 4 +- usr.bin/tftp/tftpsubs.c | 4 +- usr.bin/tmux/cmd-queue.c | 10 ++--- usr.bin/tmux/window-copy.c | 4 +- usr.sbin/amd/amd/amq_subr.c | 4 +- usr.sbin/amd/amd/nfs_ops.c | 4 +- usr.sbin/dvmrpd/dvmrpe.c | 4 +- usr.sbin/dvmrpd/probe.c | 4 +- usr.sbin/ifstated/ifstated.c | 4 +- usr.sbin/ldpd/lde.c | 4 +- usr.sbin/lpr/common_source/displayq.c | 8 ++-- usr.sbin/makefs/msdos/msdosfs_fat.c | 4 +- usr.sbin/mopd/common/print.c | 4 +- usr.sbin/mtree/compare.c | 4 +- usr.sbin/ntpd/control.c | 6 +-- usr.sbin/pcidump/pcidump.c | 12 +++--- usr.sbin/quot/quot.c | 7 ++-- usr.sbin/radiusd/radiusd_standard.c | 4 +- usr.sbin/ripd/auth.c | 4 +- usr.sbin/sasyncd/carp.c | 4 +- usr.sbin/smtpd/lka_filter.c | 4 +- usr.sbin/smtpd/mda_variables.c | 44 ++++++++++---------- usr.sbin/smtpd/mta.c | 4 +- usr.sbin/tcpdump/print-ospf.c | 4 +- usr.sbin/tcpdump/print-slow.c | 6 +-- usr.sbin/tcpdump/print-snmp.c | 4 +- 47 files changed, 183 insertions(+), 184 deletions(-) diff --git a/bin/csh/func.c b/bin/csh/func.c index b9a775b8a52..8515fb18df8 100644 --- a/bin/csh/func.c +++ b/bin/csh/func.c @@ -1,4 +1,4 @@ -/* $OpenBSD: func.c,v 1.41 2023/03/08 04:43:04 guenther Exp $ */ +/* $OpenBSD: func.c,v 1.42 2024/04/23 13:34:50 jsg Exp $ */ /* $NetBSD: func.c,v 1.11 1996/02/09 02:28:29 christos Exp $ */ /*- @@ -866,8 +866,8 @@ xecho(int sep, Char **v) (void) fflush(cshout); if (setintr) sigprocmask(SIG_BLOCK, &sigset, NULL); - blkfree(gargv); - gargv = NULL; + blkfree(gargv); + gargv = NULL; } void diff --git a/bin/ed/buf.c b/bin/ed/buf.c index 06dc7ebc89c..48fa5e7b30f 100644 --- a/bin/ed/buf.c +++ b/bin/ed/buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.c,v 1.24 2019/06/28 13:34:59 deraadt Exp $ */ +/* $OpenBSD: buf.c,v 1.25 2024/04/23 13:34:50 jsg Exp $ */ /* $NetBSD: buf.c,v 1.15 1995/04/23 10:07:28 cgd Exp $ */ /* buf.c: This file contains the scratch-file buffer routines for the @@ -158,8 +158,8 @@ get_line_node_addr(line_t *lp) if (n && cp == &buffer_head) { seterrmsg("invalid address"); return ERR; - } - return n; + } + return n; } diff --git a/bin/ksh/c_ksh.c b/bin/ksh/c_ksh.c index cd75f77ad6f..d2933bd93c0 100644 --- a/bin/ksh/c_ksh.c +++ b/bin/ksh/c_ksh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_ksh.c,v 1.62 2019/06/28 13:34:59 deraadt Exp $ */ +/* $OpenBSD: c_ksh.c,v 1.63 2024/04/23 13:34:50 jsg Exp $ */ /* * built-in Korn commands: c_* @@ -810,8 +810,8 @@ c_typeset(char **wp) if ((vp->flag&INT_U)) shprintf("-U "); shprintf("%s\n", vp->name); - if (vp->flag&ARRAY) - break; + if (vp->flag&ARRAY) + break; } else { if (pflag) shprintf("%s ", diff --git a/bin/ksh/edit.c b/bin/ksh/edit.c index a06cbe7b4e0..3ed69e5375d 100644 --- a/bin/ksh/edit.c +++ b/bin/ksh/edit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: edit.c,v 1.70 2023/06/21 22:22:08 millert Exp $ */ +/* $OpenBSD: edit.c,v 1.71 2024/04/23 13:34:50 jsg Exp $ */ /* * Command line editing - common code @@ -451,7 +451,7 @@ x_file_glob(int flags, const char *str, int slen, char ***wordsp) * which evaluated to an empty string (e.g., * "$FOO" when there is no FOO, etc). */ - if ((lstat(words[0], &statb) == -1) || + if ((lstat(words[0], &statb) == -1) || words[0][0] == '\0') { x_free_words(nwords, words); words = NULL; diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c index d278b3d4b4c..70e9bbb1bdb 100644 --- a/bin/pax/buf_subs.c +++ b/bin/pax/buf_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf_subs.c,v 1.32 2023/11/26 16:04:17 espie Exp $ */ +/* $OpenBSD: buf_subs.c,v 1.33 2024/04/23 13:34:50 jsg Exp $ */ /* $NetBSD: buf_subs.c,v 1.5 1995/03/21 09:07:08 cgd Exp $ */ /*- @@ -765,7 +765,7 @@ cp_file(ARCHD *arcn, int fd1, int fd2) * check for holes in the source file. If none, we will use regular * write instead of file write. */ - if (((off_t)(arcn->sb.st_blocks * BLKMULT)) >= arcn->sb.st_size) + if (((off_t)(arcn->sb.st_blocks * BLKMULT)) >= arcn->sb.st_size) ++no_hole; /* diff --git a/sbin/fsck_ext2fs/inode.c b/sbin/fsck_ext2fs/inode.c index bfe3e5f6797..a1861b08623 100644 --- a/sbin/fsck_ext2fs/inode.c +++ b/sbin/fsck_ext2fs/inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inode.c,v 1.29 2019/07/01 07:13:44 kevlo Exp $ */ +/* $OpenBSD: inode.c,v 1.30 2024/04/23 13:34:50 jsg Exp $ */ /* $NetBSD: inode.c,v 1.8 2000/01/28 16:01:46 bouyer Exp $ */ /* @@ -92,7 +92,7 @@ inosize(struct ext2fs_dinode *dp) size |= (u_int64_t)letoh32(dp->e2di_size_hi) << 32; if (size >= 0x80000000U) (void)setlarge(); - return size; + return size; } void diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 1f71d27ae31..17adf7dc20f 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: growfs.c,v 1.56 2024/02/03 18:51:57 beck Exp $ */ +/* $OpenBSD: growfs.c,v 1.57 2024/04/23 13:34:50 jsg Exp $ */ /* * Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz * Copyright (c) 1980, 1989, 1993 The Regents of the University of California. @@ -984,7 +984,7 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag) (d % sblock.fs_fpg) / sblock.fs_frag); acg.cg_cs.cs_nbfree++; sblock.fs_cstotal.cs_nbfree++; - if (sblock.fs_contigsumsize > 0) { + if (sblock.fs_contigsumsize > 0) { setbit(cg_clustersfree(&acg), (d % sblock.fs_fpg) / sblock.fs_frag); /* @@ -1896,7 +1896,7 @@ main(int argc, char **argv) sblock.fs_ncyl = sblock.fs_size * NSPF(&sblock) / sblock.fs_spc; if (sblock.fs_size * NSPF(&sblock) > sblock.fs_ncyl * sblock.fs_spc) - sblock.fs_ncyl++; + sblock.fs_ncyl++; } sblock.fs_ncg = howmany(sblock.fs_size, sblock.fs_fpg); if ((ino_t)sblock.fs_ncg * sblock.fs_ipg > UINT_MAX) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 8310907e9f7..eb5a9f2ead8 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifconfig.c,v 1.470 2023/11/23 03:38:34 dlg Exp $ */ +/* $OpenBSD: ifconfig.c,v 1.471 2024/04/23 13:34:50 jsg Exp $ */ /* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */ /* @@ -6313,7 +6313,7 @@ umb_pinop(int op, int is_puk, const char *pin, const char *newpin) if (newpin) { if ((mp.newpinlen = char_to_utf16(newpin, (uint16_t *)mp.newpin, sizeof (mp.newpin))) == -1) - errx(1, "new PIN too long"); + errx(1, "new PIN too long"); } if (ioctl(sock, SIOCSUMBPARAM, (caddr_t)&ifr) == -1) diff --git a/sbin/ncheck_ffs/ncheck_ffs.c b/sbin/ncheck_ffs/ncheck_ffs.c index 793fb18276b..285716abf4d 100644 --- a/sbin/ncheck_ffs/ncheck_ffs.c +++ b/sbin/ncheck_ffs/ncheck_ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncheck_ffs.c,v 1.55 2019/07/03 03:24:02 deraadt Exp $ */ +/* $OpenBSD: ncheck_ffs.c,v 1.56 2024/04/23 13:34:50 jsg Exp $ */ /*- * Copyright (c) 1995, 1996 SigmaSoft, Th. Lockert @@ -462,7 +462,7 @@ searchdir(ufsino_t ino, daddr_t blkno, long size, off_t filesize, if (dp->d_name[0] == '.') { if (dp->d_name[1] == '\0' || (dp->d_name[1] == '.' && dp->d_name[2] == '\0')) - continue; + continue; } if (asprintf(&npath, "%s/%s", path, dp->d_name) == -1) errx(1, "malloc"); diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index a3b3d650eb5..dd09c272e1b 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.248 2022/12/01 07:34:06 florian Exp $ */ +/* $OpenBSD: ping.c,v 1.249 2024/04/23 13:34:50 jsg Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -378,7 +378,7 @@ main(int argc, char *argv[]) case 'p': /* fill buffer with user pattern */ options |= F_PINGFILLED; fill((char *)datap, optarg); - break; + break; case 'q': options |= F_QUIET; break; 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 . 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 @@ -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 @@ -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 * Copyright (c) 1995 Tatu Ylonen , 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("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 @@ -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 @@ -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); diff --git a/usr.sbin/amd/amd/amq_subr.c b/usr.sbin/amd/amd/amq_subr.c index c1fce38b3a2..174fb7c2353 100644 --- a/usr.sbin/amd/amd/amq_subr.c +++ b/usr.sbin/amd/amd/amq_subr.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)amq_subr.c 8.1 (Berkeley) 6/6/93 - * $Id: amq_subr.c,v 1.19 2022/12/28 21:30:15 jmc Exp $ + * $Id: amq_subr.c,v 1.20 2024/04/23 13:34:51 jsg Exp $ */ /* @@ -300,7 +300,7 @@ xdr_amq_mount_stats(XDR *xdrs, amq_mount_stats *objp) bool_t xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp) { - if (!xdr_array(xdrs, (char **)&objp->amq_mount_tree_list_val, (u_int *)&objp->amq_mount_tree_list_len, ~0, sizeof(amq_mount_tree_p), xdr_amq_mount_tree_p)) { + if (!xdr_array(xdrs, (char **)&objp->amq_mount_tree_list_val, (u_int *)&objp->amq_mount_tree_list_len, ~0, sizeof(amq_mount_tree_p), xdr_amq_mount_tree_p)) { return (FALSE); } return (TRUE); diff --git a/usr.sbin/amd/amd/nfs_ops.c b/usr.sbin/amd/amd/nfs_ops.c index 7c2e01e6a16..2ad336386ed 100644 --- a/usr.sbin/amd/amd/nfs_ops.c +++ b/usr.sbin/amd/amd/nfs_ops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_ops.c,v 1.27 2021/10/21 10:55:56 deraadt Exp $ */ +/* $OpenBSD: nfs_ops.c,v 1.28 2024/04/23 13:34:51 jsg Exp $ */ /*- * Copyright (c) 1990 Jan-Simon Pendry @@ -377,7 +377,7 @@ call_mountd(fh_cache *fp, u_long proc, fwd_fun f, void *wchan) * to be redone. The quick solution here is to invalidate the MOUNTD * port. */ - fp->fh_sin.sin_port = 0; + fp->fh_sin.sin_port = 0; return error; } diff --git a/usr.sbin/dvmrpd/dvmrpe.c b/usr.sbin/dvmrpd/dvmrpe.c index c799e37e841..17071a5bc16 100644 --- a/usr.sbin/dvmrpd/dvmrpe.c +++ b/usr.sbin/dvmrpd/dvmrpe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dvmrpe.c,v 1.23 2021/01/19 12:29:46 claudio Exp $ */ +/* $OpenBSD: dvmrpe.c,v 1.24 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2005 Claudio Jeker @@ -314,7 +314,7 @@ dvmrpe_dispatch_rde(int fd, short event, void *bula) ssize_t n; int shut = 0; - if (event & EV_READ) { + if (event & EV_READ) { if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN) fatal("imsg_read error"); if (n == 0) /* connection closed */ diff --git a/usr.sbin/dvmrpd/probe.c b/usr.sbin/dvmrpd/probe.c index 98b803c8d4c..6a8d32a84a9 100644 --- a/usr.sbin/dvmrpd/probe.c +++ b/usr.sbin/dvmrpd/probe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: probe.c,v 1.5 2023/06/26 10:08:56 claudio Exp $ */ +/* $OpenBSD: probe.c,v 1.6 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2005, 2006 Esben Norby @@ -115,7 +115,7 @@ recv_probe(struct iface *iface, struct in_addr src, u_int32_t src_ip, if (nbr_id == iface->addr.s_addr) { /* seen myself */ if (nbr->state < NBR_STA_2_WAY) - nbr_fsm(nbr, NBR_EVT_2_WAY_RCVD); + nbr_fsm(nbr, NBR_EVT_2_WAY_RCVD); break; } buf += sizeof(nbr_id); diff --git a/usr.sbin/ifstated/ifstated.c b/usr.sbin/ifstated/ifstated.c index 80e5c48eac6..66297283e9a 100644 --- a/usr.sbin/ifstated/ifstated.c +++ b/usr.sbin/ifstated/ifstated.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifstated.c,v 1.67 2022/12/28 21:30:16 jmc Exp $ */ +/* $OpenBSD: ifstated.c,v 1.68 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2004 Marco Pfatschbacher @@ -548,7 +548,7 @@ adjust_expressions(struct ifsd_expression_list *expressions, int depth) } if (expression->parent != NULL) { if (TAILQ_EMPTY(&nexpressions)) - te = NULL; + te = NULL; TAILQ_FOREACH(te, &nexpressions, eval) if (expression->parent == te) break; diff --git a/usr.sbin/ldpd/lde.c b/usr.sbin/ldpd/lde.c index 1f41a59d6d9..b16ad2ac2b5 100644 --- a/usr.sbin/ldpd/lde.c +++ b/usr.sbin/ldpd/lde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lde.c,v 1.77 2023/12/14 11:10:19 claudio Exp $ */ +/* $OpenBSD: lde.c,v 1.78 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2013, 2016 Renato Westphal @@ -1163,7 +1163,7 @@ lde_nbr_clear(void) { struct lde_nbr *ln; - while ((ln = RB_ROOT(&lde_nbrs)) != NULL) + while ((ln = RB_ROOT(&lde_nbrs)) != NULL) lde_nbr_del(ln); } diff --git a/usr.sbin/lpr/common_source/displayq.c b/usr.sbin/lpr/common_source/displayq.c index 4eb544202d3..f43c64e474f 100644 --- a/usr.sbin/lpr/common_source/displayq.c +++ b/usr.sbin/lpr/common_source/displayq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: displayq.c,v 1.40 2018/04/26 12:42:51 guenther Exp $ */ +/* $OpenBSD: displayq.c,v 1.41 2024/04/23 13:34:51 jsg Exp $ */ /* $NetBSD: displayq.c,v 1.21 2001/08/30 00:51:50 itojun Exp $ */ /* @@ -462,9 +462,9 @@ dump(char *nfile, char *file, int copies) * Print as many files as will fit * (leaving room for the total size) */ - fill = first ? 0 : 2; /* fill space for ``, '' */ - if (((n = strlen(nfile)) + col + fill) >= - (termwidth - (80 - SIZCOL)) - 4) { + fill = first ? 0 : 2; /* fill space for ``, '' */ + if (((n = strlen(nfile)) + col + fill) >= + (termwidth - (80 - SIZCOL)) - 4) { if (col < (termwidth - (80 - SIZCOL))) { printf(" ..."), col += 4; blankfill(termwidth - (80 - SIZCOL)); diff --git a/usr.sbin/makefs/msdos/msdosfs_fat.c b/usr.sbin/makefs/msdos/msdosfs_fat.c index bcf2cc84535..cf64f8b0fc4 100644 --- a/usr.sbin/makefs/msdos/msdosfs_fat.c +++ b/usr.sbin/makefs/msdos/msdosfs_fat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_fat.c,v 1.7 2022/01/11 05:34:33 jsg Exp $ */ +/* $OpenBSD: msdosfs_fat.c,v 1.8 2024/04/23 13:34:51 jsg Exp $ */ /* $NetBSD: msdosfs_fat.c,v 1.31 2016/05/07 16:43:02 mlelstv Exp $ */ /*- @@ -1065,7 +1065,7 @@ extendfile(struct denode *dep, u_long count, struct mkfsbuf **bpp, u_long *ncp, clrbuf(bp); if (bpp) { *bpp = bp; - bpp = NULL; + bpp = NULL; } else { bdwrite(bp); } diff --git a/usr.sbin/mopd/common/print.c b/usr.sbin/mopd/common/print.c index 524dd6e21c3..266028c1880 100644 --- a/usr.sbin/mopd/common/print.c +++ b/usr.sbin/mopd/common/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.14 2022/12/28 21:30:17 jmc Exp $ */ +/* $OpenBSD: print.c,v 1.15 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 1993-96 Mats O Jansson. All rights reserved. @@ -135,7 +135,7 @@ mopPrintOneline(FILE *fd, u_char *pkt, int trans) mopPrintHWA(fd, src); fprintf(fd, " > "); mopPrintHWA(fd, dst); if (len < 1600) - fprintf(fd, " len %4d code %02x ", len, code); + fprintf(fd, " len %4d code %02x ", len, code); else fprintf(fd, " len %4d code %02x ", (len % 256)*256 + (len /256), code); diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index 6ac3ff76508..9e1097aa6f6 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -1,5 +1,5 @@ /* $NetBSD: compare.c,v 1.11 1996/09/05 09:56:48 mycroft Exp $ */ -/* $OpenBSD: compare.c,v 1.30 2023/08/11 05:07:28 guenther Exp $ */ +/* $OpenBSD: compare.c,v 1.31 2024/04/23 13:34:51 jsg Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -328,7 +328,7 @@ typeerr: LABEL; "-" : db_flags, (*cur_flags == '\0') ? "-" : cur_flags); - tab = "\t"; + tab = "\t"; if (uflag) if (chflags(p->fts_accpath, s->file_flags)) (void)printf(", not modified: %s)\n", diff --git a/usr.sbin/ntpd/control.c b/usr.sbin/ntpd/control.c index 6ca4cefea44..82494118659 100644 --- a/usr.sbin/ntpd/control.c +++ b/usr.sbin/ntpd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.20 2023/12/20 15:36:36 otto Exp $ */ +/* $OpenBSD: control.c,v 1.21 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -251,7 +251,7 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt) build_show_sensor(&c_sensor, s); imsg_compose(&c->ibuf, IMSG_CTL_SHOW_SENSORS, 0, 0, -1, &c_sensor, sizeof(c_sensor)); - cnt++; + cnt++; } imsg_compose(&c->ibuf, IMSG_CTL_SHOW_SENSORS_END, 0, 0, -1, &cnt, sizeof(cnt)); @@ -276,7 +276,7 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt) build_show_sensor(&c_sensor, s); imsg_compose(&c->ibuf, IMSG_CTL_SHOW_SENSORS, 0, 0, -1, &c_sensor, sizeof(c_sensor)); - cnt++; + cnt++; } imsg_compose(&c->ibuf, IMSG_CTL_SHOW_SENSORS_END, 0, 0, -1, &cnt, sizeof(cnt)); diff --git a/usr.sbin/pcidump/pcidump.c b/usr.sbin/pcidump/pcidump.c index c7dc589ce89..9643402ec59 100644 --- a/usr.sbin/pcidump/pcidump.c +++ b/usr.sbin/pcidump/pcidump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcidump.c,v 1.70 2024/02/01 18:26:45 kettenis Exp $ */ +/* $OpenBSD: pcidump.c,v 1.71 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2006, 2007 David Gwynne @@ -337,11 +337,11 @@ probe(int bus, int dev, int func) if (vendor != NULL) { for (pkp = pci_known_products; pkp->productname != NULL; pkp++) - if (pkp->vendor == PCI_VENDOR(id_reg) && - pkp->product == PCI_PRODUCT(id_reg)) { - product = pkp->productname; - break; - } + if (pkp->vendor == PCI_VENDOR(id_reg) && + pkp->product == PCI_PRODUCT(id_reg)) { + product = pkp->productname; + break; + } } printf(" %d:%d:%d: %s %s\n", bus, dev, func, diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 1617ce4f5a9..16f5949f836 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: quot.c,v 1.32 2018/09/18 03:09:55 millert Exp $ */ +/* $OpenBSD: quot.c,v 1.33 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (C) 1991, 1994 Wolfgang Solfrank. @@ -103,8 +103,9 @@ get_inode(int fd, struct fs *super, ino_t ino) if (pread(fd, cgp, super->fs_cgsize, (off_t)cgtod(super, cg) << super->fs_fshift) != super->fs_cgsize) - if (read(fd, cgp, super->fs_cgsize) != super->fs_cgsize) - err(1, "read cg"); + if (read(fd, cgp, super->fs_cgsize) != + super->fs_cgsize) + err(1, "read cg"); if (!cg_chkmagic(cgp)) errx(1, "cg has bad magic"); } diff --git a/usr.sbin/radiusd/radiusd_standard.c b/usr.sbin/radiusd/radiusd_standard.c index f819e3b4723..68d5f8e0f95 100644 --- a/usr.sbin/radiusd/radiusd_standard.c +++ b/usr.sbin/radiusd/radiusd_standard.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusd_standard.c,v 1.4 2024/02/09 07:41:32 yasuoka Exp $ */ +/* $OpenBSD: radiusd_standard.c,v 1.5 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2013, 2023 Internet Initiative Japan Inc. @@ -272,7 +272,7 @@ module_standard_resdeco(void *ctx, u_int q_id, const u_char *req, size_t reqlen, TAILQ_FOREACH(attr, &module->remove_resattrs, next) { if (radres == NULL && (radres = radius_convert_packet(res, reslen)) == NULL) { - syslog(LOG_ERR, + syslog(LOG_ERR, "%s: radius_convert_packet() failed: %m", __func__); module_stop(module->base); return; diff --git a/usr.sbin/ripd/auth.c b/usr.sbin/ripd/auth.c index 10449740647..e48b880b558 100644 --- a/usr.sbin/ripd/auth.c +++ b/usr.sbin/ripd/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.13 2023/06/22 10:38:27 claudio Exp $ */ +/* $OpenBSD: auth.c,v 1.14 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2006 Michele Marchetto @@ -251,7 +251,7 @@ auth_add_trailer(struct ibuf *buf, struct iface *iface) iface->auth_keyid)) == NULL) { log_debug("auth_add_trailer: keyid %d not configured, " "interface %s", iface->auth_keyid, iface->name); - return (-1); + return (-1); } memcpy(digest, md->key, MD5_DIGEST_LENGTH); diff --git a/usr.sbin/sasyncd/carp.c b/usr.sbin/sasyncd/carp.c index ea35db196bb..881bb32d6b8 100644 --- a/usr.sbin/sasyncd/carp.c +++ b/usr.sbin/sasyncd/carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: carp.c,v 1.18 2023/02/08 08:20:54 tb Exp $ */ +/* $OpenBSD: carp.c,v 1.19 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2005 HÃ¥kan Olsson. All rights reserved. @@ -127,7 +127,7 @@ carp_demote(int demote, int force) log_msg(1, "carp_demote: unable to get " "the demote state of group '%s'", cfgstate.carp_ifgroup); - goto done; + goto done; } if (ifgr.ifgr_attrib.ifg_carp_demoted == 0) diff --git a/usr.sbin/smtpd/lka_filter.c b/usr.sbin/smtpd/lka_filter.c index e53b161969b..885004d1ba3 100644 --- a/usr.sbin/smtpd/lka_filter.c +++ b/usr.sbin/smtpd/lka_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_filter.c,v 1.74 2023/11/03 13:38:28 op Exp $ */ +/* $OpenBSD: lka_filter.c,v 1.75 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2018 Gilles Chehade @@ -729,7 +729,7 @@ filter_protocol_internal(struct filter_session *fs, uint64_t *token, uint64_t re filter->name, param, filter->config->rewrite); - filter_result_rewrite(reqid, filter->config->rewrite); + filter_result_rewrite(reqid, filter->config->rewrite); return; } else if (filter->config->disconnect) { diff --git a/usr.sbin/smtpd/mda_variables.c b/usr.sbin/smtpd/mda_variables.c index 0f2be7722c8..0542f95de33 100644 --- a/usr.sbin/smtpd/mda_variables.c +++ b/usr.sbin/smtpd/mda_variables.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mda_variables.c,v 1.9 2023/03/19 16:43:44 millert Exp $ */ +/* $OpenBSD: mda_variables.c,v 1.10 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2011-2017 Gilles Chehade @@ -74,27 +74,27 @@ mda_expand_token(char *dest, size_t len, const char *token, return -1; *lbracket = *rbracket = '\0'; - content = lbracket + 1; - - if ((sep = strchr(content, ':')) == NULL) - endoff = begoff = strtonum(content, -EXPAND_BUFFER, - EXPAND_BUFFER, &errstr); - else { - *sep = '\0'; - if (content != sep) - begoff = strtonum(content, -EXPAND_BUFFER, - EXPAND_BUFFER, &errstr); - if (*(++sep)) { - if (errstr == NULL) - endoff = strtonum(sep, -EXPAND_BUFFER, - EXPAND_BUFFER, &errstr); - } - } - if (errstr) - return -1; - - /* token:mod_1,mod_2,mod_n -> extract modifiers */ - mods = strchr(rbracket + 1, ':'); + content = lbracket + 1; + + if ((sep = strchr(content, ':')) == NULL) + endoff = begoff = strtonum(content, -EXPAND_BUFFER, + EXPAND_BUFFER, &errstr); + else { + *sep = '\0'; + if (content != sep) + begoff = strtonum(content, -EXPAND_BUFFER, + EXPAND_BUFFER, &errstr); + if (*(++sep)) { + if (errstr == NULL) + endoff = strtonum(sep, -EXPAND_BUFFER, + EXPAND_BUFFER, &errstr); + } + } + if (errstr) + return -1; + + /* token:mod_1,mod_2,mod_n -> extract modifiers */ + mods = strchr(rbracket + 1, ':'); } else { if ((mods = strchr(rtoken, ':')) != NULL) *mods++ = '\0'; diff --git a/usr.sbin/smtpd/mta.c b/usr.sbin/smtpd/mta.c index fe433220ac4..8022d23ecb0 100644 --- a/usr.sbin/smtpd/mta.c +++ b/usr.sbin/smtpd/mta.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mta.c,v 1.247 2024/01/03 08:11:15 op Exp $ */ +/* $OpenBSD: mta.c,v 1.248 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -1364,7 +1364,7 @@ mta_connect(struct mta_connector *c) mta_session(c->relay, route, mx->mxname); /* this never fails synchronously */ mta_relay_ref(c->relay); - goto again; + goto again; } static void diff --git a/usr.sbin/tcpdump/print-ospf.c b/usr.sbin/tcpdump/print-ospf.c index 43068928a56..f567228eb10 100644 --- a/usr.sbin/tcpdump/print-ospf.c +++ b/usr.sbin/tcpdump/print-ospf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-ospf.c,v 1.22 2020/01/24 22:46:37 procter Exp $ */ +/* $OpenBSD: print-ospf.c,v 1.23 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997 @@ -343,7 +343,7 @@ ospf_print_lsa(const struct lsa *lsap) (u_int32_t)ntohl(mcp->mcla_vtype)); break; } - ++mcp; + ++mcp; } } diff --git a/usr.sbin/tcpdump/print-slow.c b/usr.sbin/tcpdump/print-slow.c index d05117b7f82..4643f7851ac 100644 --- a/usr.sbin/tcpdump/print-slow.c +++ b/usr.sbin/tcpdump/print-slow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-slow.c,v 1.4 2015/11/16 00:16:39 mmcc Exp $ */ +/* $OpenBSD: print-slow.c,v 1.5 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 1998-2005 The TCPDUMP project @@ -261,7 +261,7 @@ slow_print(const u_char *pptr, u_int len) tlen -= tlv_len; } - return; + return; trunc: - printf("\n\t[|slow]"); + printf("\n\t[|slow]"); } diff --git a/usr.sbin/tcpdump/print-snmp.c b/usr.sbin/tcpdump/print-snmp.c index 4458287b590..7bdbdf6bd27 100644 --- a/usr.sbin/tcpdump/print-snmp.c +++ b/usr.sbin/tcpdump/print-snmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-snmp.c,v 1.29 2024/02/03 00:20:21 jsg Exp $ */ +/* $OpenBSD: print-snmp.c,v 1.30 2024/04/23 13:34:51 jsg Exp $ */ /* * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997 @@ -662,7 +662,7 @@ asn1_print(struct be *elem) case BE_NULL: break; case BE_OID: { - int o = 0, first = -1, i = asnlen; + int o = 0, first = -1, i = asnlen; if (!nflag && asnlen > 2) { struct obj_abrev *a = &obj_abrev_list[0]; -- 2.20.1