Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
8d583016
Commit
8d583016
authored
May 05, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use strrchr()
parent
d1aff398
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
src/libvlc-common.c
src/libvlc-common.c
+7
-15
No files found.
src/libvlc-common.c
View file @
8d583016
...
@@ -248,23 +248,15 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
...
@@ -248,23 +248,15 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
system_Init
(
p_libvlc
,
&
i_argc
,
ppsz_argv
);
system_Init
(
p_libvlc
,
&
i_argc
,
ppsz_argv
);
/* Get the executable name (similar to the basename command) */
/* Get the executable name (similar to the basename command) */
if
(
i_argc
>
0
)
if
(
i_argc
>
0
&&
ppsz_argv
[
0
][
0
]
)
{
{
const
char
*
psz_exe
=
ppsz_argv
[
0
]
+
strlen
(
ppsz_argv
[
0
]
);
free
(
p_libvlc
->
psz_object_name
);
for
(
;
psz_exe
>
ppsz_argv
[
0
]
;
psz_exe
--
)
{
if
(
*
psz_exe
==
'/'
)
{
psz_exe
++
;
break
;
}
}
if
(
*
psz_exe
)
const
char
*
psz_exe
=
strrchr
(
ppsz_argv
[
0
],
'/'
);
{
if
(
psz_exe
&&
*
(
psz_exe
+
1
)
)
free
(
p_libvlc
->
psz_object_name
);
p_libvlc
->
psz_object_name
=
strdup
(
psz_exe
+
1
);
p_libvlc
->
psz_object_name
=
strdup
(
psz_exe
);
else
}
p_libvlc
->
psz_object_name
=
strdup
(
ppsz_argv
[
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