summaryrefslogtreecommitdiff
path: root/wcsmbs/wmemset.c
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs/wmemset.c')
-rw-r--r--wcsmbs/wmemset.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/wcsmbs/wmemset.c b/wcsmbs/wmemset.c
index 42ff55b009..c0812cf616 100644
--- a/wcsmbs/wmemset.c
+++ b/wcsmbs/wmemset.c
@@ -1,6 +1,6 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Dreppere <drepper@gnu.ai.mit.edu>, 1996.
+ Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -40,16 +40,16 @@ wmemset (s, c, n)
if (n > 0)
{
- *wp++ = c;
- --n;
- }
- if (n > 0)
- {
- *wp++ = c;
- --n;
+ wp[0] = c;
+
+ if (n > 1)
+ {
+ wp[1] = c;
+
+ if (n > 2)
+ wp[2] = c;
+ }
}
- if (n > 0)
- *wp = c;
return s;
}