aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-23 23:01:38 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-23 23:01:38 +0100
commit31d4bd72b9ba8b5d6b7ac3438a500639821ae25e (patch)
tree19b30af9c128e51403ea87a43486fba09f48345a
parentsatrm (diff)
downloadsat-31d4bd72b9ba8b5d6b7ac3438a500639821ae25e.tar.gz
sat-31d4bd72b9ba8b5d6b7ac3438a500639821ae25e.tar.bz2
sat-31d4bd72b9ba8b5d6b7ac3438a500639821ae25e.tar.xz
m fix
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
-rw-r--r--src/satq.c7
-rw-r--r--src/satr.c7
-rw-r--r--src/satrm.c6
3 files changed, 6 insertions, 14 deletions
diff --git a/src/satq.c b/src/satq.c
index 6fafba4..f1c29b2 100644
--- a/src/satq.c
+++ b/src/satq.c
@@ -59,11 +59,8 @@ usage(void)
int
main(int argc, char *argv[])
{
- if (argc > 1) {
- usage();
- } else if (argc == 1) {
- argv0 = argv[0];
- }
+ if (argc > 0) argv0 = argv[0];
+ if (argc > 1) usage();
if (send_command(0, NULL))
return errno ? (perror(argv0), 1) : 3;
diff --git a/src/satr.c b/src/satr.c
index 739e432..d9594ee 100644
--- a/src/satr.c
+++ b/src/satr.c
@@ -59,11 +59,8 @@ usage(void)
int
main(int argc, char *argv[])
{
- if (argc > 1) {
- usage();
- } else if (argc == 1) {
- argv0 = argv[0];
- }
+ if (argc > 0) argv0 = argv[0];
+ if (argc > 1) usage();
if (send_command(1, NULL))
return errno ? (perror(argv0), 1) : 3;
diff --git a/src/satrm.c b/src/satrm.c
index 36a8b26..e1280bc 100644
--- a/src/satrm.c
+++ b/src/satrm.c
@@ -60,10 +60,8 @@ usage(void)
int
main(int argc, char *argv[])
{
- if (argc != 2) {
- usage();
- }
- argv0 = argv[0];
+ if (argc > 0) argv0 = argv[0];
+ if (argc != 2) usage();
if (send_command(0, argv[1]))
return errno ? (perror(argv0), 1) : 3;