Fixed warning on amd64.
[cert-checker.git] / main.c
diff --git a/main.c b/main.c
index fcbd79a9c4658f36c2bea81c79d6942c3cd4533a..9598d2ecb3b6411ff5c284626e64e8e7b5776d2d 100644 (file)
--- a/main.c
+++ b/main.c
@@ -34,6 +34,7 @@
 
 int warning_after = 30;
 int error_after = 7;
+int verbose = 0;
 
 #define LOG_LEVEL 0
 
@@ -104,7 +105,7 @@ int check( char * hostname, char *service ) {
 
        /* Connect to server */
 
-       int fd = tcp_open( hostname, service );
+       long fd = tcp_open( hostname, service );
        
        if (fd == -1) {
                state= S_UNREACHABLE;
@@ -205,6 +206,8 @@ int main(int argc, char **argv) {
                        case 'h':
                                print_help();
                                exit(0);
+                       case 'v':
+                               verbose++;
                        default: break;
                }
        }
@@ -247,5 +250,12 @@ int main(int argc, char **argv) {
 }
 
 void print_help() {
-       printf("Help yourself.");
+       printf(
+               "Usage: cert-checker [options] -H hostname -p|s port|service\n"
+               "  Where options could be: \n"
+               "       -h      this help\n"
+               "       -w      warning level (in days, default 30)\n"
+               "       -c      critical level (in days, default 7)\n"
+               "       -v      verbosity level\n"      
+       );
 }