diff options
| author | 2009-07-01 18:17:16 +0200 | |
|---|---|---|
| committer | 2009-07-01 19:42:53 -0700 | |
| commit | ade4dedb5f0d69122a5c742aa96c8bd150dab9a7 (patch) | |
| tree | fe546fac54da415fe374155ae3962990c51da7fe /dev/syslog_relay.c | |
| parent | f035afebdb932a0f32c6a394f72e23418c52302f (diff) | |
| download | libimobiledevice-ade4dedb5f0d69122a5c742aa96c8bd150dab9a7.tar.gz libimobiledevice-ade4dedb5f0d69122a5c742aa96c8bd150dab9a7.tar.bz2 | |
Fix segfault when displaying usage for installed iphoneinfo and iphonesyslog
[#54 state:resolved]
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'dev/syslog_relay.c')
| -rw-r--r-- | dev/syslog_relay.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dev/syslog_relay.c b/dev/syslog_relay.c index e552e9c..6698653 100644 --- a/dev/syslog_relay.c +++ b/dev/syslog_relay.c | |||
| @@ -154,7 +154,10 @@ int main(int argc, char *argv[]) | |||
| 154 | 154 | ||
| 155 | void print_usage(int argc, char **argv) | 155 | void print_usage(int argc, char **argv) |
| 156 | { | 156 | { |
| 157 | printf("Usage: %s [OPTIONS]\n", (strrchr(argv[0], '/') + 1)); | 157 | char *name = NULL; |
| 158 | |||
| 159 | name = strrchr(argv[0], '/'); | ||
| 160 | printf("Usage: %s [OPTIONS]\n", (name ? name + 1: argv[0])); | ||
| 158 | printf("Relay syslog of a connected iPhone/iPod Touch.\n\n"); | 161 | printf("Relay syslog of a connected iPhone/iPod Touch.\n\n"); |
| 159 | printf(" -d, --debug\t\tenable communication debugging\n"); | 162 | printf(" -d, --debug\t\tenable communication debugging\n"); |
| 160 | printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n"); | 163 | printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n"); |
