Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
e068f2bb
Commit
e068f2bb
authored
Nov 01, 2012
by
Philip Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug in cl_setenv on Windows XP
parent
0ccfc63b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
tests-clar/clar_helpers.c
+5
-1
No files found.
tests-clar/clar_helpers.c
View file @
e068f2bb
...
...
@@ -89,7 +89,11 @@ int cl_setenv(const char *name, const char *value)
if
(
value
!=
NULL
)
git__utf8_to_16
(
value_utf16
,
GIT_WIN_PATH
,
value
);
cl_assert
(
SetEnvironmentVariableW
(
name_utf16
,
value
?
value_utf16
:
NULL
));
/* Windows XP returns 0 (failed) when passing NULL for lpValue when lpName
* does not exist in the environment block. This behavior seems to have changed
* in later versions. Don't fail when SetEnvironmentVariable fails, if we passed
* NULL for lpValue. */
cl_assert
(
SetEnvironmentVariableW
(
name_utf16
,
value
?
value_utf16
:
NULL
)
||
!
value
);
return
0
;
}
...
...
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