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
d57ad7b0
Commit
d57ad7b0
authored
Jun 03, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Jun 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Move duplicate sane_path() calls to wmain.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2864105e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
15 deletions
+9
-15
reg.c
programs/reg/reg.c
+9
-15
No files found.
programs/reg/reg.c
View file @
d57ad7b0
...
...
@@ -351,9 +351,6 @@ static int reg_add(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
LPWSTR
p
;
HKEY
root
,
subkey
;
if
(
!
sane_path
(
key_name
))
return
1
;
p
=
strchrW
(
key_name
,
'\\'
);
if
(
p
)
p
++
;
...
...
@@ -431,9 +428,6 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
LPWSTR
p
;
HKEY
root
,
subkey
;
if
(
!
sane_path
(
key_name
))
return
1
;
p
=
strchrW
(
key_name
,
'\\'
);
if
(
p
)
p
++
;
...
...
@@ -836,9 +830,6 @@ static int reg_query(WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL
WCHAR
newlineW
[]
=
{
'\n'
,
0
};
int
ret
;
if
(
!
sane_path
(
key_name
))
return
1
;
if
(
value_name
&&
value_empty
)
{
output_message
(
STRING_INVALID_CMDLINE
);
...
...
@@ -917,6 +908,7 @@ int wmain(int argc, WCHAR *argvW[])
{
int
i
,
op
;
BOOL
show_op_help
=
FALSE
;
WCHAR
*
key_name
;
static
const
WCHAR
slashDW
[]
=
{
'/'
,
'd'
,
0
};
static
const
WCHAR
slashFW
[]
=
{
'/'
,
'f'
,
0
};
static
const
WCHAR
slashSW
[]
=
{
'/'
,
's'
,
0
};
...
...
@@ -967,12 +959,16 @@ int wmain(int argc, WCHAR *argvW[])
return
0
;
}
key_name
=
argvW
[
2
];
if
(
!
sane_path
(
key_name
))
return
1
;
if
(
op
==
REG_ADD
)
{
WCHAR
*
key_name
,
*
value_name
=
NULL
,
*
type
=
NULL
,
separator
=
'\0'
,
*
data
=
NULL
;
WCHAR
*
value_name
=
NULL
,
*
type
=
NULL
,
separator
=
'\0'
,
*
data
=
NULL
;
BOOL
value_empty
=
FALSE
,
force
=
FALSE
;
key_name
=
argvW
[
2
];
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashVW
))
...
...
@@ -1014,10 +1010,9 @@ int wmain(int argc, WCHAR *argvW[])
}
else
if
(
op
==
REG_DELETE
)
{
WCHAR
*
key_name
,
*
value_name
=
NULL
;
WCHAR
*
value_name
=
NULL
;
BOOL
value_empty
=
FALSE
,
value_all
=
FALSE
,
force
=
FALSE
;
key_name
=
argvW
[
2
];
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashVW
))
...
...
@@ -1039,10 +1034,9 @@ int wmain(int argc, WCHAR *argvW[])
}
else
if
(
op
==
REG_QUERY
)
{
WCHAR
*
key_name
,
*
value_name
=
NULL
;
WCHAR
*
value_name
=
NULL
;
BOOL
value_empty
=
FALSE
,
recurse
=
FALSE
;
key_name
=
argvW
[
2
];
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashVW
))
...
...
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