* [PATCH] agetty: Change size_t to const size_t to match other function.
@ 2021-05-29 1:44 Marlon Rac Cambasis
0 siblings, 0 replies; only message in thread
From: Marlon Rac Cambasis @ 2021-05-29 1:44 UTC (permalink / raw)
To: util-linux
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-29 1:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-29 1:44 [PATCH] agetty: Change size_t to const size_t to match other function Marlon Rac Cambasis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).