From 44cbff73fe9732490005db4a6628a42eebab613e Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 9 Oct 2024 01:52:11 +0000 Subject: [PATCH] correct indentation --- usr.sbin/ypserv/revnetgroup/parse_netgroup.c | 60 ++++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/usr.sbin/ypserv/revnetgroup/parse_netgroup.c b/usr.sbin/ypserv/revnetgroup/parse_netgroup.c index 2e7ace857bf..a78a1d736fb 100644 --- a/usr.sbin/ypserv/revnetgroup/parse_netgroup.c +++ b/usr.sbin/ypserv/revnetgroup/parse_netgroup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse_netgroup.c,v 1.14 2022/12/28 21:30:19 jmc Exp $ */ +/* $OpenBSD: parse_netgroup.c,v 1.15 2024/10/09 01:52:11 jsg Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -302,38 +302,38 @@ read_for_group(char *group) *(lp->l_groupname + len) = '\0'; len = strlen(pos); olen = 0; - /* - * Loop around handling line continuations. - */ - do { - if (*(pos + len - 1) == '\n') - len--; - if (*(pos + len - 1) == '\\') { - len--; - cont = 1; - } else - cont = 0; - if (len > 0) { - linep = malloc(olen + len + 1); - if (olen > 0) { - bcopy(olinep, linep, olen); - free(olinep); - } - bcopy(pos, linep + olen, len); - olen += len; - *(linep + olen) = '\0'; - olinep = linep; + /* + * Loop around handling line continuations. + */ + do { + if (*(pos + len - 1) == '\n') + len--; + if (*(pos + len - 1) == '\\') { + len--; + cont = 1; + } else + cont = 0; + if (len > 0) { + linep = malloc(olen + len + 1); + if (olen > 0) { + bcopy(olinep, linep, olen); + free(olinep); } + bcopy(pos, linep + olen, len); + olen += len; + *(linep + olen) = '\0'; + olinep = linep; + } #ifdef CANT_HAPPEN - if (cont) { - if (fgets(line, sizeof(line), netf)) { - pos = line; - len = strlen(pos); - } else - cont = 0; - } + if (cont) { + if (fgets(line, sizeof(line), netf)) { + pos = line; + len = strlen(pos); + } else + cont = 0; + } #endif - } while (cont); + } while (cont); lp->l_line = linep; lp->l_next = linehead; linehead = lp; -- 2.20.1