summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/shell/main_netstats.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-03-07 20:09:36 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-03-07 20:09:36 +0000
commit85659eeeb61570697044d6dc6617a8c6edb84049 (patch)
treef7767fddb777574a1fa22490a7ba2244edf553f4 /cpukit/libmisc/shell/main_netstats.c
parent2008-03-07 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-85659eeeb61570697044d6dc6617a8c6edb84049.tar.bz2
2008-03-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/shell/main_cp.c, libmisc/shell/main_netstats.c, libmisc/shell/shell_script.c: Add memset() of getopt_data to ensure it is zeroed out each time we use getopt_r(). * libmisc/shell/shell.c: Do not echo commands if input is not a tty. This makes the scripts behave more like UNIX scripts.
Diffstat (limited to 'cpukit/libmisc/shell/main_netstats.c')
-rw-r--r--cpukit/libmisc/shell/main_netstats.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/main_netstats.c b/cpukit/libmisc/shell/main_netstats.c
index a86b7afa35..2fe5eb7c6d 100644
--- a/cpukit/libmisc/shell/main_netstats.c
+++ b/cpukit/libmisc/shell/main_netstats.c
@@ -55,6 +55,7 @@ int rtems_shell_main_netstats( /* command */
int verbose = 0;
struct getopt_data getopt_reent;
+ memset(&getopt_reent, 0, sizeof(getopt_data));
while ( (option = getopt_r( argc, argv, "Aimfpcutv", &getopt_reent)) != -1 ) {
switch ((char)option) {