Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
094f5b42
Commit
094f5b42
authored
Jul 24, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
attrib: Use the ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b4b69429
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
attrib.c
programs/attrib/attrib.c
+3
-3
No files found.
programs/attrib/attrib.c
View file @
094f5b42
...
...
@@ -36,7 +36,7 @@ static WCHAR *ATTRIB_LoadMessage(UINT id)
static
WCHAR
msg
[
MAXSTRING
];
const
WCHAR
failedMsg
[]
=
{
'F'
,
'a'
,
'i'
,
'l'
,
'e'
,
'd'
,
'!'
,
0
};
if
(
!
LoadStringW
(
GetModuleHandleW
(
NULL
),
id
,
msg
,
sizeof
(
msg
)
/
sizeof
(
WCHAR
)))
{
if
(
!
LoadStringW
(
GetModuleHandleW
(
NULL
),
id
,
msg
,
ARRAY_SIZE
(
msg
)))
{
WINE_FIXME
(
"LoadString failed with %d
\n
"
,
GetLastError
());
lstrcpyW
(
msg
,
failedMsg
);
}
...
...
@@ -236,7 +236,7 @@ static BOOL ATTRIB_processdirectory(const WCHAR *rootdir, const WCHAR *filespec,
strcpyW
(
buffer
,
rootdir
);
strcatW
(
buffer
,
fd
.
cFileName
);
ATTRIB_wprintf
(
fmt
,
flags
,
buffer
);
for
(
count
=
0
;
count
<
(
sizeof
(
flags
)
/
sizeof
(
WCHAR
)
-
1
);
count
++
)
flags
[
count
]
=
' '
;
for
(
count
=
0
;
count
<
(
ARRAY_SIZE
(
flags
)
-
1
);
count
++
)
flags
[
count
]
=
' '
;
found
=
TRUE
;
}
}
while
(
FindNextFileW
(
hff
,
&
fd
)
!=
0
);
...
...
@@ -302,7 +302,7 @@ int wmain(int argc, WCHAR *argv[])
/* Name may be a relative or explicit path, so calculate curdir based on
current locations, stripping off the filename */
WINE_TRACE
(
"Supplied name: '%s'
\n
"
,
wine_dbgstr_w
(
originalname
));
GetFullPathNameW
(
originalname
,
sizeof
(
curdir
)
/
sizeof
(
WCHAR
),
curdir
,
&
namepart
);
GetFullPathNameW
(
originalname
,
ARRAY_SIZE
(
curdir
),
curdir
,
&
namepart
);
WINE_TRACE
(
"Result: '%s'
\n
"
,
wine_dbgstr_w
(
curdir
));
if
(
namepart
)
{
strcpyW
(
name
,
namepart
);
...
...
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