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
1fba1185
Commit
1fba1185
authored
Jul 17, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pdh: Use nameless unions/structs.
parent
fb296929
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
pdh_main.c
dlls/pdh/pdh_main.c
+7
-9
No files found.
dlls/pdh/pdh_main.c
View file @
1fba1185
...
...
@@ -23,8 +23,6 @@
#include <stdlib.h>
#include <math.h>
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
...
...
@@ -302,18 +300,18 @@ static PDH_STATUS format_value( struct counter *counter, DWORD format, union val
factor
=
counter
->
scale
?
counter
->
scale
:
counter
->
defaultscale
;
if
(
format
&
PDH_FMT_LONG
)
{
if
(
format
&
PDH_FMT_1000
)
value
->
u
.
longValue
=
raw2
->
longvalue
*
1000
;
else
value
->
u
.
longValue
=
raw2
->
longvalue
*
pow
(
10
,
factor
);
if
(
format
&
PDH_FMT_1000
)
value
->
longValue
=
raw2
->
longvalue
*
1000
;
else
value
->
longValue
=
raw2
->
longvalue
*
pow
(
10
,
factor
);
}
else
if
(
format
&
PDH_FMT_LARGE
)
{
if
(
format
&
PDH_FMT_1000
)
value
->
u
.
largeValue
=
raw2
->
largevalue
*
1000
;
else
value
->
u
.
largeValue
=
raw2
->
largevalue
*
pow
(
10
,
factor
);
if
(
format
&
PDH_FMT_1000
)
value
->
largeValue
=
raw2
->
largevalue
*
1000
;
else
value
->
largeValue
=
raw2
->
largevalue
*
pow
(
10
,
factor
);
}
else
if
(
format
&
PDH_FMT_DOUBLE
)
{
if
(
format
&
PDH_FMT_1000
)
value
->
u
.
doubleValue
=
raw2
->
doublevalue
*
1000
;
else
value
->
u
.
doubleValue
=
raw2
->
doublevalue
*
pow
(
10
,
factor
);
if
(
format
&
PDH_FMT_1000
)
value
->
doubleValue
=
raw2
->
doublevalue
*
1000
;
else
value
->
doubleValue
=
raw2
->
doublevalue
*
pow
(
10
,
factor
);
}
else
{
...
...
@@ -1076,7 +1074,7 @@ double WINAPI PdhVbGetDoubleCounterValue( PDH_HCOUNTER handle, PDH_STATUS *count
status
=
PdhGetFormattedCounterValue
(
handle
,
PDH_FMT_DOUBLE
,
NULL
,
&
value
);
if
(
counter_status
)
*
counter_status
=
status
;
return
value
.
u
.
doubleValue
;
return
value
.
doubleValue
;
}
/***********************************************************************
...
...
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