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
116662e5
Commit
116662e5
authored
Nov 22, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: fixed shadow warning on "basename"
Renamed the local variable "basename", which shadows the POSIX function basename().
parent
d9b3efa6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
update.c
src/update.c
+6
-6
No files found.
src/update.c
View file @
116662e5
...
@@ -412,7 +412,7 @@ static struct directory *
...
@@ -412,7 +412,7 @@ static struct directory *
directory_make_child_checked
(
struct
directory
*
parent
,
const
char
*
path
)
directory_make_child_checked
(
struct
directory
*
parent
,
const
char
*
path
)
{
{
struct
directory
*
directory
;
struct
directory
*
directory
;
char
*
base
name
;
char
*
base
;
struct
stat
st
;
struct
stat
st
;
struct
song
*
conflicting
;
struct
song
*
conflicting
;
...
@@ -420,21 +420,21 @@ directory_make_child_checked(struct directory *parent, const char *path)
...
@@ -420,21 +420,21 @@ directory_make_child_checked(struct directory *parent, const char *path)
if
(
directory
!=
NULL
)
if
(
directory
!=
NULL
)
return
directory
;
return
directory
;
base
name
=
g_path_get_basename
(
path
);
base
=
g_path_get_basename
(
path
);
if
(
stat_directory_child
(
parent
,
base
name
,
&
st
)
<
0
||
if
(
stat_directory_child
(
parent
,
base
,
&
st
)
<
0
||
inodeFoundInParent
(
parent
,
st
.
st_ino
,
st
.
st_dev
))
{
inodeFoundInParent
(
parent
,
st
.
st_ino
,
st
.
st_dev
))
{
g_free
(
base
name
);
g_free
(
base
);
return
NULL
;
return
NULL
;
}
}
/* if we're adding directory paths, make sure to delete filenames
/* if we're adding directory paths, make sure to delete filenames
with potentially the same name */
with potentially the same name */
conflicting
=
songvec_find
(
&
parent
->
songs
,
base
name
);
conflicting
=
songvec_find
(
&
parent
->
songs
,
base
);
if
(
conflicting
)
if
(
conflicting
)
delete_song
(
parent
,
conflicting
);
delete_song
(
parent
,
conflicting
);
g_free
(
base
name
);
g_free
(
base
);
directory
=
directory_new_child
(
parent
,
path
);
directory
=
directory_new_child
(
parent
,
path
);
directory_set_stat
(
directory
,
&
st
);
directory_set_stat
(
directory
,
&
st
);
...
...
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