check -m option
authorceriel <none@none>
Fri, 11 May 1990 13:11:12 +0000 (13:11 +0000)
committerceriel <none@none>
Fri, 11 May 1990 13:11:12 +0000 (13:11 +0000)
util/ack/main.c

index 5b8dc9e..5ec702b 100644 (file)
@@ -162,6 +162,9 @@ vieuwargs(argc,argv) char **argv ; {
                switch ( argp[1] ) {
           case 'm':    if ( machine ) fuerror("Two machines?") ;
                        machine= &argp[2];
+                       if (*machine == '\0') {
+                               fuerror("-m needs machine name");
+                       }
                        eaten=1 ;
                        break ;
           case 'o':    if ( nextarg>=argc ) {