Michael Stefaniuc : msvcrt: Remove superfluous pointer casts.
Alexandre Julliard
julliard at winehq.org
Thu Jan 29 09:15:41 CST 2009
Module: wine
Branch: master
Commit: 9d4c9a0cdddb805fcd0806221a13ced2026e376f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d4c9a0cdddb805fcd0806221a13ced2026e376f
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Thu Jan 29 11:15:54 2009 +0100
msvcrt: Remove superfluous pointer casts.
---
dlls/msvcrt/file.c | 4 ++--
dlls/msvcrt/locale.c | 2 +-
dlls/msvcrt/time.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 30f83e6..6082cb9 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -2109,7 +2109,7 @@ int CDECL MSVCRT__write(int fd, const void* buf, unsigned int count)
unsigned int i, j, nr_lf;
char *p = NULL;
const char *q;
- const char *s = (const char *)buf, *buf_start = (const char *)buf;
+ const char *s = buf, *buf_start = buf;
/* find number of \n ( without preceding \r ) */
for ( nr_lf=0,i = 0; i <count; i++)
{
@@ -2123,7 +2123,7 @@ int CDECL MSVCRT__write(int fd, const void* buf, unsigned int count)
{
if ((q = p = MSVCRT_malloc(count + nr_lf)))
{
- for (s = (const char *)buf, i = 0, j = 0; i < count; i++)
+ for (s = buf, i = 0, j = 0; i < count; i++)
{
if (s[i]== '\n')
{
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index e0ddb94..f524c8d 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -265,7 +265,7 @@ static void msvcrt_set_ctype(unsigned int codepage, LCID lcid)
{
int i;
char str[3];
- unsigned char *traverse = (unsigned char *)cp.LeadByte;
+ unsigned char *traverse = cp.LeadByte;
memset(MSVCRT_current_ctype, 0, sizeof(MSVCRT__ctype));
MSVCRT___lc_codepage = codepage;
diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c
index f95b8b6..a929120 100644
--- a/dlls/msvcrt/time.c
+++ b/dlls/msvcrt/time.c
@@ -173,7 +173,7 @@ MSVCRT_wchar_t* CDECL _wstrdate(MSVCRT_wchar_t* date)
{
static const WCHAR format[] = { 'M','M','\'','/','\'','d','d','\'','/','\'','y','y',0 };
- GetDateFormatW(LOCALE_NEUTRAL, 0, NULL, format, (LPWSTR)date, 9);
+ GetDateFormatW(LOCALE_NEUTRAL, 0, NULL, format, date, 9);
return date;
}
@@ -197,7 +197,7 @@ MSVCRT_wchar_t* CDECL _wstrtime(MSVCRT_wchar_t* time)
{
static const WCHAR format[] = { 'H','H','\'',':','\'','m','m','\'',':','\'','s','s',0 };
- GetTimeFormatW(LOCALE_NEUTRAL, 0, NULL, format, (LPWSTR)time, 9);
+ GetTimeFormatW(LOCALE_NEUTRAL, 0, NULL, format, time, 9);
return time;
}
More information about the wine-cvs
mailing list