]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Rename a few global variables which hold hostname-related values to be
authorGarance A Drosehn <gad@FreeBSD.org>
Fri, 15 Jun 2001 22:03:07 +0000 (22:03 +0000)
committerGarance A Drosehn <gad@FreeBSD.org>
Fri, 15 Jun 2001 22:03:07 +0000 (22:03 +0000)
commitcc3fd56f96f5726a445a8a6090bda47a94122df6
tree34bd9934cba11944407fb52a6d7f9c516d667752
parent7474a22698a1e190f752da548c73b6a9505cd1e1
Rename a few global variables which hold hostname-related values to be
more sensible/understandable.  'from'->'from_host'  'host'->'local_host'
'fromb'->'frombuf'  'fromhost'->'origin_host'  and a local-variable
named 'host'->'hostbuf'.  This fixes some compile-time warnings about
local variables shadowing global variables.

Other than renaming variables, the only actual code changes are to call
strlcpy() instead of strncpy() when setting those (renamed) variables,
and that 'from_ip' is now a strdup()-created buffer instead of being a
static buffer compiled in as 1025 bytes.

Reviewed by: freebsd-print@bostonradio.org (an earlier version)
MFC after: 1 week
12 files changed:
usr.sbin/lpr/common_source/common.c
usr.sbin/lpr/common_source/displayq.c
usr.sbin/lpr/common_source/lp.h
usr.sbin/lpr/common_source/net.c
usr.sbin/lpr/common_source/rmjob.c
usr.sbin/lpr/lpd/extern.h
usr.sbin/lpr/lpd/lpd.c
usr.sbin/lpr/lpd/printjob.c
usr.sbin/lpr/lpd/recvjob.c
usr.sbin/lpr/lpq/lpq.c
usr.sbin/lpr/lpr/lpr.c
usr.sbin/lpr/lprm/lprm.c