Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
a0fcd0cf
Commit
a0fcd0cf
authored
Jan 24, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dirvec: don't call g_path_get_basename() on parameter
This overhead is completely useless, because no caller expects this behaviour.
parent
5d5c753c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
dirvec.c
src/dirvec.c
+3
-10
No files found.
src/dirvec.c
View file @
a0fcd0cf
...
...
@@ -50,22 +50,15 @@ void dirvec_sort(struct dirvec *dv)
struct
directory
*
dirvec_find
(
const
struct
dirvec
*
dv
,
const
char
*
path
)
{
char
*
base
;
int
i
;
struct
directory
*
ret
=
NULL
;
base
=
g_path_get_basename
(
path
);
db_lock
();
for
(
i
=
dv
->
nr
;
--
i
>=
0
;
)
if
(
!
strcmp
(
directory_get_name
(
dv
->
base
[
i
]),
base
))
{
ret
=
dv
->
base
[
i
];
break
;
}
if
(
!
strcmp
(
directory_get_name
(
dv
->
base
[
i
]),
path
))
return
dv
->
base
[
i
];
db_unlock
();
g_free
(
base
);
return
ret
;
return
NULL
;
}
int
dirvec_delete
(
struct
dirvec
*
dv
,
struct
directory
*
del
)
...
...
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