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
cef6b073
Commit
cef6b073
authored
Oct 09, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Use BOOL type where appropriate.
parent
742c2563
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
misc.c
dlls/setupapi/misc.c
+1
-1
parser.c
dlls/setupapi/parser.c
+8
-8
No files found.
dlls/setupapi/misc.c
View file @
cef6b073
...
@@ -1502,7 +1502,7 @@ static DWORD decompress_file_cab( LPCWSTR source, LPCWSTR target )
...
@@ -1502,7 +1502,7 @@ static DWORD decompress_file_cab( LPCWSTR source, LPCWSTR target )
*/
*/
DWORD
WINAPI
SetupDecompressOrCopyFileA
(
PCSTR
source
,
PCSTR
target
,
PUINT
type
)
DWORD
WINAPI
SetupDecompressOrCopyFileA
(
PCSTR
source
,
PCSTR
target
,
PUINT
type
)
{
{
DWORD
ret
=
FALSE
;
DWORD
ret
=
0
;
WCHAR
*
sourceW
=
NULL
,
*
targetW
=
NULL
;
WCHAR
*
sourceW
=
NULL
,
*
targetW
=
NULL
;
if
(
source
&&
!
(
sourceW
=
MultiByteToUnicode
(
source
,
CP_ACP
)))
return
FALSE
;
if
(
source
&&
!
(
sourceW
=
MultiByteToUnicode
(
source
,
CP_ACP
)))
return
FALSE
;
...
...
dlls/setupapi/parser.c
View file @
cef6b073
...
@@ -471,14 +471,14 @@ static inline enum parser_state set_state( struct parser *parser, enum parser_st
...
@@ -471,14 +471,14 @@ static inline enum parser_state set_state( struct parser *parser, enum parser_st
/* check if the pointer points to an end of file */
/* check if the pointer points to an end of file */
static
inline
int
is_eof
(
const
struct
parser
*
parser
,
const
WCHAR
*
ptr
)
static
inline
BOOL
is_eof
(
const
struct
parser
*
parser
,
const
WCHAR
*
ptr
)
{
{
return
(
ptr
>=
parser
->
end
||
*
ptr
==
CONTROL_Z
);
return
(
ptr
>=
parser
->
end
||
*
ptr
==
CONTROL_Z
);
}
}
/* check if the pointer points to an end of line */
/* check if the pointer points to an end of line */
static
inline
int
is_eol
(
const
struct
parser
*
parser
,
const
WCHAR
*
ptr
)
static
inline
BOOL
is_eol
(
const
struct
parser
*
parser
,
const
WCHAR
*
ptr
)
{
{
return
(
ptr
>=
parser
->
end
||
*
ptr
==
CONTROL_Z
||
*
ptr
==
'\n'
);
return
(
ptr
>=
parser
->
end
||
*
ptr
==
CONTROL_Z
||
*
ptr
==
'\n'
);
}
}
...
@@ -528,7 +528,7 @@ static int add_section_from_token( struct parser *parser )
...
@@ -528,7 +528,7 @@ static int add_section_from_token( struct parser *parser )
/* add a field containing the current token to the current line */
/* add a field containing the current token to the current line */
static
struct
field
*
add_field_from_token
(
struct
parser
*
parser
,
int
is_key
)
static
struct
field
*
add_field_from_token
(
struct
parser
*
parser
,
BOOL
is_key
)
{
{
struct
field
*
field
;
struct
field
*
field
;
WCHAR
*
text
;
WCHAR
*
text
;
...
@@ -648,14 +648,14 @@ static const WCHAR *key_name_state( struct parser *parser, const WCHAR *pos )
...
@@ -648,14 +648,14 @@ static const WCHAR *key_name_state( struct parser *parser, const WCHAR *pos )
case
'='
:
case
'='
:
push_token
(
parser
,
token_end
);
push_token
(
parser
,
token_end
);
if
(
!
add_field_from_token
(
parser
,
1
))
return
NULL
;
if
(
!
add_field_from_token
(
parser
,
TRUE
))
return
NULL
;
parser
->
start
=
p
+
1
;
parser
->
start
=
p
+
1
;
push_state
(
parser
,
VALUE_NAME
);
push_state
(
parser
,
VALUE_NAME
);
set_state
(
parser
,
LEADING_SPACES
);
set_state
(
parser
,
LEADING_SPACES
);
return
p
+
1
;
return
p
+
1
;
case
';'
:
case
';'
:
push_token
(
parser
,
token_end
);
push_token
(
parser
,
token_end
);
if
(
!
add_field_from_token
(
parser
,
0
))
return
NULL
;
if
(
!
add_field_from_token
(
parser
,
FALSE
))
return
NULL
;
push_state
(
parser
,
LINE_START
);
push_state
(
parser
,
LINE_START
);
set_state
(
parser
,
COMMENT
);
set_state
(
parser
,
COMMENT
);
return
p
+
1
;
return
p
+
1
;
...
@@ -700,13 +700,13 @@ static const WCHAR *value_name_state( struct parser *parser, const WCHAR *pos )
...
@@ -700,13 +700,13 @@ static const WCHAR *value_name_state( struct parser *parser, const WCHAR *pos )
{
{
case
';'
:
case
';'
:
push_token
(
parser
,
token_end
);
push_token
(
parser
,
token_end
);
if
(
!
add_field_from_token
(
parser
,
0
))
return
NULL
;
if
(
!
add_field_from_token
(
parser
,
FALSE
))
return
NULL
;
push_state
(
parser
,
LINE_START
);
push_state
(
parser
,
LINE_START
);
set_state
(
parser
,
COMMENT
);
set_state
(
parser
,
COMMENT
);
return
p
+
1
;
return
p
+
1
;
case
','
:
case
','
:
push_token
(
parser
,
token_end
);
push_token
(
parser
,
token_end
);
if
(
!
add_field_from_token
(
parser
,
0
))
return
NULL
;
if
(
!
add_field_from_token
(
parser
,
FALSE
))
return
NULL
;
parser
->
start
=
p
+
1
;
parser
->
start
=
p
+
1
;
push_state
(
parser
,
VALUE_NAME
);
push_state
(
parser
,
VALUE_NAME
);
set_state
(
parser
,
LEADING_SPACES
);
set_state
(
parser
,
LEADING_SPACES
);
...
@@ -736,7 +736,7 @@ static const WCHAR *value_name_state( struct parser *parser, const WCHAR *pos )
...
@@ -736,7 +736,7 @@ static const WCHAR *value_name_state( struct parser *parser, const WCHAR *pos )
}
}
}
}
push_token
(
parser
,
token_end
);
push_token
(
parser
,
token_end
);
if
(
!
add_field_from_token
(
parser
,
0
))
return
NULL
;
if
(
!
add_field_from_token
(
parser
,
FALSE
))
return
NULL
;
set_state
(
parser
,
LINE_START
);
set_state
(
parser
,
LINE_START
);
return
p
;
return
p
;
}
}
...
...
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