Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Feb 2018 18:36:24 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328855 - head/libexec/getty
Message-ID:  <201802041836.w14IaOEh077092@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Sun Feb  4 18:36:24 2018
New Revision: 328855
URL: https://svnweb.freebsd.org/changeset/base/328855

Log:
  Don't cast away the const, it's not been needed since r92925.
  
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/libexec/getty/subr.c

Modified: head/libexec/getty/subr.c
==============================================================================
--- head/libexec/getty/subr.c	Sun Feb  4 17:38:45 2018	(r328854)
+++ head/libexec/getty/subr.c	Sun Feb  4 18:36:24 2018	(r328855)
@@ -101,7 +101,7 @@ gettable(const char *name, char *buf)
 		firsttime = 0;
 	}
 
-	switch (cgetent(&buf, (char **)dba, (char *)name)) {
+	switch (cgetent(&buf, (char **)dba, name)) {
 	case 1:
 		msg = "%s: couldn't resolve 'tc=' in gettytab '%s'";
 	case 0:
@@ -126,7 +126,7 @@ gettable(const char *name, char *buf)
 	}
 
 	for (sp = gettystrs; sp->field; sp++) {
-		if ((l = cgetstr(buf, (char*)sp->field, &p)) >= 0) {
+		if ((l = cgetstr(buf, sp->field, &p)) >= 0) {
 			if (sp->value) {
 				/* prefer existing value */
 				if (strcmp(p, sp->value) != 0)
@@ -144,7 +144,7 @@ gettable(const char *name, char *buf)
 	}
 
 	for (np = gettynums; np->field; np++) {
-		if (cgetnum(buf, (char*)np->field, &n) == -1)
+		if (cgetnum(buf, np->field, &n) == -1)
 			np->set = 0;
 		else {
 			np->set = 1;
@@ -153,7 +153,7 @@ gettable(const char *name, char *buf)
 	}
 
 	for (fp = gettyflags; fp->field; fp++) {
-		if (cgetcap(buf, (char *)fp->field, ':') == NULL)
+		if (cgetcap(buf, fp->field, ':') == NULL)
 			fp->set = 0;
 		else {
 			fp->set = 1;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802041836.w14IaOEh077092>