diff options
| author | Stephen McKay <mckay@FreeBSD.org> | 2000-07-13 12:55:50 +0000 |
|---|---|---|
| committer | Stephen McKay <mckay@FreeBSD.org> | 2000-07-13 12:55:50 +0000 |
| commit | faeff70b735a94f4c7827b49d6edb2ee4305116f (patch) | |
| tree | 77b0db3f683788a4d0577b225037dd97ac66f0ee /usr.sbin/cdcontrol | |
| parent | f4683775d724a91ef5abb5884af3500525fb9c7a (diff) | |
Notes
Diffstat (limited to 'usr.sbin/cdcontrol')
| -rw-r--r-- | usr.sbin/cdcontrol/cdcontrol.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/cdcontrol/cdcontrol.c b/usr.sbin/cdcontrol/cdcontrol.c index 3a68af872f4b..118d8c0e79b9 100644 --- a/usr.sbin/cdcontrol/cdcontrol.c +++ b/usr.sbin/cdcontrol/cdcontrol.c @@ -243,8 +243,6 @@ int run (int cmd, char *arg) { int l, r, rc; - if (arg == NULL) - return 0; switch (cmd) { case CMD_QUIT: @@ -956,8 +954,11 @@ input (int *cmd) el_set(el, EL_SIGNAL, 1); el_source(el, NULL); } - if ((bp = el_gets(el, &num)) == NULL || num == 0) + if ((bp = el_gets(el, &num)) == NULL || num == 0) { + *cmd = CMD_QUIT; + fprintf (stderr, "\r\n"); return (0); + } len = (num > MAXLINE) ? MAXLINE : num; memcpy(buf, bp, len); |
