summaryrefslogtreecommitdiff
path: root/lib-src/getopt.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-11-06 00:44:44 +0000
committerUlrich Drepper <drepper@redhat.com>1997-11-06 00:44:44 +0000
commit4e941b8ea818755d90229d6e835e803436aafb97 (patch)
tree69afd1af80ed725c37f8e3de2a00fd9620032f78 /lib-src/getopt.c
parent4b7c78fcf17e578b61c0c8ea6eae30b45acf7f0e (diff)
downloademacs-4e941b8ea818755d90229d6e835e803436aafb97.tar.gz
automatically generated from GPLed version
Diffstat (limited to 'lib-src/getopt.c')
-rw-r--r--lib-src/getopt.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib-src/getopt.c b/lib-src/getopt.c
index 570cb9da69e..2d3f3b64bf2 100644
--- a/lib-src/getopt.c
+++ b/lib-src/getopt.c
@@ -331,9 +331,9 @@ exchange (argv)
nonoption_flags_len = nonoption_flags_max_len = 0;
else
{
- memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len);
- memset (&new_str[nonoption_flags_max_len], '\0',
- top + 1 - nonoption_flags_max_len);
+ memset (__mempcpy (new_str, __getopt_nonoption_flags,
+ nonoption_flags_max_len),
+ '\0', top + 1 - nonoption_flags_max_len);
nonoption_flags_max_len = top + 1;
__getopt_nonoption_flags = new_str;
}
@@ -442,11 +442,8 @@ _getopt_initialize (argc, argv, optstring)
if (__getopt_nonoption_flags == NULL)
nonoption_flags_max_len = -1;
else
- {
- memcpy (__getopt_nonoption_flags, orig_str, len);
- memset (&__getopt_nonoption_flags[len], '\0',
- nonoption_flags_max_len - len);
- }
+ memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+ '\0', nonoption_flags_max_len - len);
}
}
nonoption_flags_len = nonoption_flags_max_len;