Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
fontconfig
fontconfig
Commits
3c75a5a9
Commit
3c75a5a9
authored
Nov 26, 2018
by
Chris McDonald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lowered temporary rooted_dir variable inside loop
parent
d36f977c
Pipeline
#10139
passed with stage
in 5 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
19 deletions
+12
-19
fc-cache/fc-cache.c
fc-cache/fc-cache.c
+12
-19
No files found.
fc-cache/fc-cache.c
View file @
3c75a5a9
...
...
@@ -142,7 +142,6 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
FcBool
was_valid
,
was_processed
=
FcFalse
;
int
i
;
const
FcChar8
*
sysroot
=
FcConfigGetSysRoot
(
config
);
FcChar8
*
rooted_dir
=
NULL
;
/*
* Now scan all of the directories into separate databases
...
...
@@ -158,20 +157,6 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
fflush
(
stdout
);
}
if
(
rooted_dir
)
{
FcStrFree
(
rooted_dir
);
rooted_dir
=
NULL
;
}
if
(
sysroot
)
{
rooted_dir
=
FcStrPlus
(
sysroot
,
dir
);
}
else
{
rooted_dir
=
FcStrCopy
(
dir
);
}
if
(
FcStrSetMember
(
processed_dirs
,
dir
))
{
if
(
verbose
)
...
...
@@ -179,6 +164,15 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
continue
;
}
FcChar8
*
rooted_dir
=
NULL
;
if
(
sysroot
)
{
rooted_dir
=
FcStrPlus
(
sysroot
,
dir
);
}
else
{
rooted_dir
=
FcStrCopy
(
dir
);
}
if
(
stat
((
char
*
)
rooted_dir
,
&
statb
)
==
-
1
)
{
switch
(
errno
)
{
...
...
@@ -196,6 +190,9 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
continue
;
}
FcStrFree
(
rooted_dir
);
rooted_dir
=
NULL
;
if
(
!
S_ISDIR
(
statb
.
st_mode
))
{
fprintf
(
stderr
,
_
(
"
\"
%s
\"
: not a directory, skipping
\n
"
),
dir
);
...
...
@@ -275,10 +272,6 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
FcStrListDone
(
sublist
);
}
if
(
rooted_dir
)
{
FcStrFree
(
rooted_dir
);
}
if
(
error_on_no_fonts
&&
!
was_processed
)
ret
++
;
return
ret
;
...
...
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