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
e4271d87
Commit
e4271d87
authored
Dec 04, 2008
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack/tests: Fix string format warning.
parent
75b53222
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
install.c
dlls/advpack/tests/install.c
+7
-14
No files found.
dlls/advpack/tests/install.c
View file @
e4271d87
...
...
@@ -55,27 +55,20 @@ static BOOL is_spapi_err(DWORD err)
return
(((
err
&
SPAPI_MASK
)
^
SPAPI_PREFIX
)
==
0
);
}
static
void
append_str
(
char
**
str
,
const
char
*
data
)
{
sprintf
(
*
str
,
data
);
*
str
+=
strlen
(
*
str
);
}
static
void
create_inf_file
(
LPCSTR
filename
)
{
char
data
[
1024
];
char
*
ptr
=
data
;
DWORD
dwNumberOfBytesWritten
;
HANDLE
hf
=
CreateFile
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
append_str
(
&
ptr
,
"[Version]
\n
"
);
append_str
(
&
ptr
,
"Signature=
\"
$Chicago$
\"\n
"
);
append_str
(
&
ptr
,
"AdvancedINF=2.5
\n
"
);
append_str
(
&
ptr
,
"[DefaultInstall]
\n
"
);
append_str
(
&
ptr
,
"CheckAdminRights=1
\n
"
);
static
const
char
data
[]
=
"[Version]
\n
"
"Signature=
\"
$Chicago$
\"\n
"
"AdvancedINF=2.5
\n
"
"[DefaultInstall]
\n
"
"CheckAdminRights=1
\n
"
;
WriteFile
(
hf
,
data
,
ptr
-
data
,
&
dwNumberOfBytesWritten
,
NULL
);
WriteFile
(
hf
,
data
,
sizeof
(
data
)
-
1
,
&
dwNumberOfBytesWritten
,
NULL
);
CloseHandle
(
hf
);
}
...
...
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