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
89bdb2f4
Commit
89bdb2f4
authored
Nov 16, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Nov 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
odbc32: Use BOOL type where appropriate.
parent
e2df0ab8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
proxyodbc.c
dlls/odbc32/proxyodbc.c
+19
-19
No files found.
dlls/odbc32/proxyodbc.c
View file @
89bdb2f4
...
@@ -194,9 +194,9 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
...
@@ -194,9 +194,9 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
{
{
HKEY
hODBCInst
;
HKEY
hODBCInst
;
LONG
reg_ret
;
LONG
reg_ret
;
int
success
;
BOOL
success
;
success
=
0
;
success
=
FALSE
;
TRACE
(
"Driver settings are not currently replicated to the registry
\n
"
);
TRACE
(
"Driver settings are not currently replicated to the registry
\n
"
);
if
((
reg_ret
=
RegCreateKeyExA
(
HKEY_LOCAL_MACHINE
,
if
((
reg_ret
=
RegCreateKeyExA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
ODBC
\\
ODBCINST.INI"
,
0
,
NULL
,
"Software
\\
ODBC
\\
ODBCINST.INI"
,
0
,
NULL
,
...
@@ -215,7 +215,7 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
...
@@ -215,7 +215,7 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
CHAR
desc
[
256
];
CHAR
desc
[
256
];
SQLSMALLINT
sizedesc
;
SQLSMALLINT
sizedesc
;
success
=
1
;
success
=
TRUE
;
dirn
=
SQL_FETCH_FIRST
;
dirn
=
SQL_FETCH_FIRST
;
while
((
sql_ret
=
SQLDrivers
(
hEnv
,
dirn
,
(
SQLCHAR
*
)
desc
,
sizeof
(
desc
),
while
((
sql_ret
=
SQLDrivers
(
hEnv
,
dirn
,
(
SQLCHAR
*
)
desc
,
sizeof
(
desc
),
&
sizedesc
,
NULL
,
0
,
NULL
))
==
SQL_SUCCESS
||
&
sizedesc
,
NULL
,
0
,
NULL
))
==
SQL_SUCCESS
||
...
@@ -234,14 +234,14 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
...
@@ -234,14 +234,14 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
{
{
TRACE
(
"Error %d replicating driver %s
\n
"
,
TRACE
(
"Error %d replicating driver %s
\n
"
,
reg_ret
,
desc
);
reg_ret
,
desc
);
success
=
0
;
success
=
FALSE
;
}
}
}
}
else
if
(
reg_ret
!=
ERROR_SUCCESS
)
else
if
(
reg_ret
!=
ERROR_SUCCESS
)
{
{
TRACE
(
"Error %d checking for %s in drivers
\n
"
,
TRACE
(
"Error %d checking for %s in drivers
\n
"
,
reg_ret
,
desc
);
reg_ret
,
desc
);
success
=
0
;
success
=
FALSE
;
}
}
if
((
reg_ret
=
RegCreateKeyExA
(
hODBCInst
,
desc
,
0
,
if
((
reg_ret
=
RegCreateKeyExA
(
hODBCInst
,
desc
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
NULL
,
REG_OPTION_NON_VOLATILE
,
...
@@ -263,20 +263,20 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
...
@@ -263,20 +263,20 @@ static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv)
{
{
TRACE
(
"Error %d ensuring driver key %s
\n
"
,
TRACE
(
"Error %d ensuring driver key %s
\n
"
,
reg_ret
,
desc
);
reg_ret
,
desc
);
success
=
0
;
success
=
FALSE
;
}
}
}
}
else
else
{
{
WARN
(
"Unusually long driver name %s not replicated
\n
"
,
WARN
(
"Unusually long driver name %s not replicated
\n
"
,
desc
);
desc
);
success
=
0
;
success
=
FALSE
;
}
}
}
}
if
(
sql_ret
!=
SQL_NO_DATA
)
if
(
sql_ret
!=
SQL_NO_DATA
)
{
{
TRACE
(
"Error %d enumerating drivers
\n
"
,
(
int
)
sql_ret
);
TRACE
(
"Error %d enumerating drivers
\n
"
,
(
int
)
sql_ret
);
success
=
0
;
success
=
FALSE
;
}
}
if
((
reg_ret
=
RegCloseKey
(
hDrivers
))
!=
ERROR_SUCCESS
)
if
((
reg_ret
=
RegCloseKey
(
hDrivers
))
!=
ERROR_SUCCESS
)
{
{
...
@@ -332,17 +332,17 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
...
@@ -332,17 +332,17 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
SQLSMALLINT
sizedsn
;
SQLSMALLINT
sizedsn
;
CHAR
desc
[
256
];
CHAR
desc
[
256
];
SQLSMALLINT
sizedesc
;
SQLSMALLINT
sizedesc
;
int
success
;
BOOL
success
;
const
char
*
which
=
is_user
?
"user"
:
"system"
;
const
char
*
which
=
is_user
?
"user"
:
"system"
;
success
=
0
;
success
=
FALSE
;
if
((
reg_ret
=
RegCreateKeyExA
(
if
((
reg_ret
=
RegCreateKeyExA
(
is_user
?
HKEY_CURRENT_USER
:
HKEY_LOCAL_MACHINE
,
is_user
?
HKEY_CURRENT_USER
:
HKEY_LOCAL_MACHINE
,
"Software
\\
ODBC
\\
ODBC.INI"
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
"Software
\\
ODBC
\\
ODBC.INI"
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_ALL_ACCESS
/* a couple more than we need */
,
NULL
,
&
hODBC
,
KEY_ALL_ACCESS
/* a couple more than we need */
,
NULL
,
&
hODBC
,
NULL
))
==
ERROR_SUCCESS
)
NULL
))
==
ERROR_SUCCESS
)
{
{
success
=
1
;
success
=
TRUE
;
dirn
=
is_user
?
SQL_FETCH_FIRST_USER
:
SQL_FETCH_FIRST_SYSTEM
;
dirn
=
is_user
?
SQL_FETCH_FIRST_USER
:
SQL_FETCH_FIRST_SYSTEM
;
while
((
sql_ret
=
SQLDataSources
(
hEnv
,
dirn
,
while
((
sql_ret
=
SQLDataSources
(
hEnv
,
dirn
,
(
SQLCHAR
*
)
dsn
,
sizeof
(
dsn
),
&
sizedsn
,
(
SQLCHAR
*
)
dsn
,
sizeof
(
dsn
),
&
sizedsn
,
...
@@ -369,14 +369,14 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
...
@@ -369,14 +369,14 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
{
{
TRACE
(
"Error %d replicating description of "
TRACE
(
"Error %d replicating description of "
"%s(%s)
\n
"
,
reg_ret
,
dsn
,
desc
);
"%s(%s)
\n
"
,
reg_ret
,
dsn
,
desc
);
success
=
0
;
success
=
FALSE
;
}
}
}
}
else
if
(
reg_ret
!=
ERROR_SUCCESS
)
else
if
(
reg_ret
!=
ERROR_SUCCESS
)
{
{
TRACE
(
"Error %d checking for description of %s
\n
"
,
TRACE
(
"Error %d checking for description of %s
\n
"
,
reg_ret
,
dsn
);
reg_ret
,
dsn
);
success
=
0
;
success
=
FALSE
;
}
}
if
((
reg_ret
=
RegCloseKey
(
hDSN
))
!=
ERROR_SUCCESS
)
if
((
reg_ret
=
RegCloseKey
(
hDSN
))
!=
ERROR_SUCCESS
)
{
{
...
@@ -388,21 +388,21 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
...
@@ -388,21 +388,21 @@ static void ODBC_ReplicateODBCToRegistry (int is_user, SQLHENV hEnv)
{
{
TRACE
(
"Error %d opening %s DSN key %s
\n
"
,
TRACE
(
"Error %d opening %s DSN key %s
\n
"
,
reg_ret
,
which
,
dsn
);
reg_ret
,
which
,
dsn
);
success
=
0
;
success
=
FALSE
;
}
}
}
}
else
else
{
{
WARN
(
"Unusually long %s data source name %s (%s) not "
WARN
(
"Unusually long %s data source name %s (%s) not "
"replicated
\n
"
,
which
,
dsn
,
desc
);
"replicated
\n
"
,
which
,
dsn
,
desc
);
success
=
0
;
success
=
FALSE
;
}
}
}
}
if
(
sql_ret
!=
SQL_NO_DATA
)
if
(
sql_ret
!=
SQL_NO_DATA
)
{
{
TRACE
(
"Error %d enumerating %s datasources
\n
"
,
TRACE
(
"Error %d enumerating %s datasources
\n
"
,
(
int
)
sql_ret
,
which
);
(
int
)
sql_ret
,
which
);
success
=
0
;
success
=
FALSE
;
}
}
if
((
reg_ret
=
RegCloseKey
(
hODBC
))
!=
ERROR_SUCCESS
)
if
((
reg_ret
=
RegCloseKey
(
hODBC
))
!=
ERROR_SUCCESS
)
{
{
...
@@ -1981,7 +1981,7 @@ SQLRETURN WINAPI SQLSetScrollOptions(
...
@@ -1981,7 +1981,7 @@ SQLRETURN WINAPI SQLSetScrollOptions(
return
pSQLSetScrollOptions
(
statement_handle
,
f_concurrency
,
crow_keyset
,
crow_rowset
);
return
pSQLSetScrollOptions
(
statement_handle
,
f_concurrency
,
crow_keyset
,
crow_rowset
);
}
}
static
int
SQLColAttributes_KnownStringAttribute
(
SQLUSMALLINT
fDescType
)
static
BOOL
SQLColAttributes_KnownStringAttribute
(
SQLUSMALLINT
fDescType
)
{
{
static
const
SQLUSMALLINT
attrList
[]
=
static
const
SQLUSMALLINT
attrList
[]
=
{
{
...
@@ -2006,9 +2006,9 @@ static int SQLColAttributes_KnownStringAttribute(SQLUSMALLINT fDescType)
...
@@ -2006,9 +2006,9 @@ static int SQLColAttributes_KnownStringAttribute(SQLUSMALLINT fDescType)
unsigned
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
attrList
)
/
sizeof
(
SQLUSMALLINT
);
i
++
)
{
for
(
i
=
0
;
i
<
sizeof
(
attrList
)
/
sizeof
(
SQLUSMALLINT
);
i
++
)
{
if
(
attrList
[
i
]
==
fDescType
)
return
1
;
if
(
attrList
[
i
]
==
fDescType
)
return
TRUE
;
}
}
return
0
;
return
FALSE
;
}
}
/*************************************************************************
/*************************************************************************
...
...
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