[PATCH] agetty: Change size_t to const size_t to match other function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux