Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ecd35a02
Commit
ecd35a02
authored
Oct 31, 2006
by
Andrew Talbot
Committed by
Alexandre Julliard
Nov 01, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Cast-qual warnings fix.
parent
8125231e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
profile.c
dlls/kernel32/profile.c
+10
-14
No files found.
dlls/kernel32/profile.c
View file @
ecd35a02
...
@@ -1073,7 +1073,7 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
...
@@ -1073,7 +1073,7 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
BOOL
win32
)
BOOL
win32
)
{
{
int
ret
;
int
ret
;
LP
CWSTR
pDefVal
=
NULL
;
LP
WSTR
defval_tmp
=
NULL
;
TRACE
(
"%s,%s,%s,%p,%u,%s
\n
"
,
debugstr_w
(
section
),
debugstr_w
(
entry
),
TRACE
(
"%s,%s,%s,%p,%u,%s
\n
"
,
debugstr_w
(
section
),
debugstr_w
(
entry
),
debugstr_w
(
def_val
),
buffer
,
len
,
debugstr_w
(
filename
));
debugstr_w
(
def_val
),
buffer
,
len
,
debugstr_w
(
filename
));
...
@@ -1092,16 +1092,13 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
...
@@ -1092,16 +1092,13 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
if
(
*
p
==
' '
)
/* ouch, contained trailing ' ' */
if
(
*
p
==
' '
)
/* ouch, contained trailing ' ' */
{
{
int
len
=
(
int
)(
p
-
def_val
);
int
len
=
(
int
)(
p
-
def_val
);
LPWSTR
p
;
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
defval_tm
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
p
,
def_val
,
len
*
sizeof
(
WCHAR
));
memcpy
(
defval_tm
p
,
def_val
,
len
*
sizeof
(
WCHAR
));
p
[
len
]
=
'\0'
;
defval_tm
p
[
len
]
=
'\0'
;
pDefVal
=
p
;
def_val
=
defval_tm
p
;
}
}
}
}
if
(
!
pDefVal
)
pDefVal
=
def_val
;
RtlEnterCriticalSection
(
&
PROFILE_CritSect
);
RtlEnterCriticalSection
(
&
PROFILE_CritSect
);
...
@@ -1110,9 +1107,9 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
...
@@ -1110,9 +1107,9 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
ret
=
PROFILE_GetSectionNames
(
buffer
,
len
);
ret
=
PROFILE_GetSectionNames
(
buffer
,
len
);
else
else
/* PROFILE_GetString can handle the 'entry == NULL' case */
/* PROFILE_GetString can handle the 'entry == NULL' case */
ret
=
PROFILE_GetString
(
section
,
entry
,
pDefV
al
,
buffer
,
len
,
win32
);
ret
=
PROFILE_GetString
(
section
,
entry
,
def_v
al
,
buffer
,
len
,
win32
);
}
else
if
(
buffer
&&
pDefV
al
)
{
}
else
if
(
buffer
&&
def_v
al
)
{
lstrcpynW
(
buffer
,
pDefV
al
,
len
);
lstrcpynW
(
buffer
,
def_v
al
,
len
);
ret
=
strlenW
(
buffer
);
ret
=
strlenW
(
buffer
);
}
}
else
else
...
@@ -1120,8 +1117,7 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
...
@@ -1120,8 +1117,7 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
RtlLeaveCriticalSection
(
&
PROFILE_CritSect
);
RtlLeaveCriticalSection
(
&
PROFILE_CritSect
);
if
(
pDefVal
!=
def_val
)
/* allocated */
HeapFree
(
GetProcessHeap
(),
0
,
defval_tmp
);
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
pDefVal
);
TRACE
(
"returning %s, %d
\n
"
,
debugstr_w
(
buffer
),
ret
);
TRACE
(
"returning %s, %d
\n
"
,
debugstr_w
(
buffer
),
ret
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment