repositories
/
deb_shairplay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6e5e8b
)
Remove some redundant code from shairplay CLI
author
Juho Vähä-Herttua
<juhovh@iki.fi>
Sun, 14 Apr 2013 19:04:21 +0000
(22:04 +0300)
committer
Juho Vähä-Herttua
<juhovh@iki.fi>
Sun, 14 Apr 2013 19:05:06 +0000
(22:05 +0300)
src/shairplay.c
patch
|
blob
|
blame
|
history
diff --git
a/src/shairplay.c
b/src/shairplay.c
index bf269efbe76acbf65e421dc9cb4b6e0b350e3a69..9bb9537fd75bdafaee512b0fefa1705815356fbf 100644
(file)
--- a/
src/shairplay.c
+++ b/
src/shairplay.c
@@
-226,7
+226,8
@@
parse_options(shairplay_options_t *opt, int argc, char *argv[])
char *path = argv[0];
char *arg;
- strcpy(opt->apname, "Shairplay");
+ /* Set default values for apname and port */
+ strncpy(opt->apname, "Shairplay", sizeof(opt->apname)-1);
opt->port = 5000;
while ((arg = *++argv)) {
@@
-264,13
+265,6
@@
parse_options(shairplay_options_t *opt, int argc, char *argv[])
}
}
- /* Set default values for apname and port */
- if (!strlen(opt->apname)) {
- strncpy(opt->apname, "Shairplay", sizeof(opt->apname)-1);
- }
- if (!opt->port) {
- opt->port = 5000;
- }
return 0;
}