diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-31 10:11:03 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-31 13:18:53 +0100 |
commit | d3d6b0879c4fc508d29227ac78aaed8779778b60 (patch) | |
tree | 3cb9cbd917554aa0a60e3c0fdf9eb56167d2ead5 /freebsd/sbin | |
parent | PING(8): Use local scope for global variables (diff) | |
download | rtems-libbsd-d3d6b0879c4fc508d29227ac78aaed8779778b60.tar.bz2 |
PING(8): Add const qualifier
Diffstat (limited to 'freebsd/sbin')
-rw-r--r-- | freebsd/sbin/ping/ping.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/freebsd/sbin/ping/ping.c b/freebsd/sbin/ping/ping.c index 039a61ed..c8e0e335 100644 --- a/freebsd/sbin/ping/ping.c +++ b/freebsd/sbin/ping/ping.c @@ -157,7 +157,7 @@ static int options; * to 8192 for complete accuracy... */ #define MAX_DUP_CHK (8 * 128) -static int mx_dup_ck = MAX_DUP_CHK; +static const int mx_dup_ck = MAX_DUP_CHK; static char rcvd_tbl[MAX_DUP_CHK / 8]; static struct sockaddr_in whereto; /* who to ping */ @@ -165,9 +165,9 @@ static int datalen = DEFDATALEN; static int maxpayload; static int s; /* socket file descriptor */ static u_char outpackhdr[IP_MAXPACKET], *outpack; -static char BBELL = '\a'; /* characters written for MISSED and AUDIBLE */ -static char BSPACE = '\b'; /* characters written for flood */ -static char DOT = '.'; +static const char BBELL = '\a'; /* characters written for MISSED and AUDIBLE */ +static const char BSPACE = '\b'; /* characters written for flood */ +static const char DOT = '.'; static char *hostname; static char *shostname; static int ident; /* process id to identify our packets */ @@ -230,9 +230,6 @@ int rtems_bsd_command_ping(int argc, char *argv[]) rtems_bsd_program_lock(); - BBELL = '\a'; - BSPACE = '\b'; - DOT = '.'; icmp_type = ICMP_ECHO; icmp_type_rsp = ICMP_ECHOREPLY; phdr_len = 0; |