Util-Linux package development
 help / color / mirror / Atom feed
From: Marlon Rac Cambasis <marlonrc08@gmail.com>
To: util-linux@vger.kernel.org
Subject: [PATCH] agetty: Change size_t to const size_t to match other function.
Date: Sat, 29 May 2021 11:44:44 +1000	[thread overview]
Message-ID: <20210529014444.GA2525@marlonpc-debian> (raw)

In xgetdomainname() it is 'const size_t sz', however in xgethostname()
it is 'size_t sz'. Add 'const' in xgethostname() to match the other
function.

Signed-off-by: Marlon Rac Cambasis <marlonrc08@gmail.com>
---
 term-utils/agetty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index a48998c16..eb7959d34 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -1476,7 +1476,7 @@ static void auto_baud(struct termios *tp)
 static char *xgethostname(void)
 {
 	char *name;
-	size_t sz = get_hostname_max() + 1;
+	const size_t sz = get_hostname_max() + 1;
 
 	name = malloc(sizeof(char) * sz);
 	if (!name)
-- 
2.20.1


                 reply	other threads:[~2021-05-29  1:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210529014444.GA2525@marlonpc-debian \
    --to=marlonrc08@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox