Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P257
Masterwork From Distant Lands
Active
Public
Actions
Authored by
ngie
on May 4 2019, 1:50 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F4535947: raw.txt
May 4 2019, 1:50 AM
2019-05-04 01:50:40 (UTC+0)
Subscribers
None
Index: usr.sbin/lpr/common_source/printcap.c
===================================================================
--- usr.sbin/lpr/common_source/printcap.c (revision 347012)
+++ usr.sbin/lpr/common_source/printcap.c (working copy)
@@ -99,15 +99,9 @@
getprintcap(const char *printer, struct printer *pp)
{
int status;
- char *XXX;
char *bp;
- /*
- * A bug in the declaration of cgetent(3) means that we have
- * to hide the constness of its third argument.
- */
- XXX = (char *)printer;
- if ((status = cgetent(&bp, printcapdb, XXX)) < 0)
+ if ((status = cgetent(&bp, printcapdb, printer)) < 0)
return status;
status = getprintcap_int(bp, pp);
free(bp);
@@ -380,10 +374,10 @@
{
int status;
- status = cgetstr(bp, (char *)/*XXX*/lng, result);
+ status = cgetstr(bp, lng, result);
if (status >= 0 || status == PCAPERR_OSERR)
return status;
- status = cgetstr(bp, (char *)/*XXX*/shrt, result);
+ status = cgetstr(bp, shrt, result);
if (status >= 0 || status == PCAPERR_OSERR)
return status;
if (dflt) {
@@ -404,10 +398,10 @@
{
int status;
- status = cgetnum(bp, (char *)/*XXX*/lng, result);
+ status = cgetnum(bp, lng, result);
if (status >= 0)
return status;
- status = cgetnum(bp, (char *)/*XXX*/shrt, result);
+ status = cgetnum(bp, shrt, result);
if (status >= 0)
return status;
*result = dflt;
@@ -421,9 +415,9 @@
static int
capdb_getaltlog(char *bp, const char *shrt, const char *lng)
{
- if (cgetcap(bp, (char *)/*XXX*/lng, ':'))
+ if (cgetcap(bp, lng, ':'))
return 1;
- if (cgetcap(bp, (char *)/*XXX*/shrt, ':'))
+ if (cgetcap(bp, shrt, ':'))
return 1;
return 0;
}
Event Timeline
ngie
edited the content of this paste.
(Show Details)
May 4 2019, 1:50 AM
2019-05-04 01:50:40 (UTC+0)
ngie
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
Log In to Comment