@@ -34,12 +34,12 @@ void print_usage()
3434int main (int argc, char ** argv)
3535{
3636
37- bool verbose = 0 ; // if set, prints detailed messages
37+ bool verbose = false ; // if set, prints detailed messages
3838
3939 std::unique_ptr<Monitoring> monitoringCollector;
40- char option;
40+ int option;
4141
42- bool isOk = 1 ;
42+ bool isOk = true ;
4343 const char *monitoringURI = nullptr ;
4444 const char *monitoringValue = nullptr ;
4545 const char *monitoringMetric = nullptr ;
@@ -61,7 +61,7 @@ int main(int argc, char** argv)
6161 } break ;
6262
6363 case ' v' : {
64- verbose = 1 ;
64+ verbose = true ;
6565 } break ;
6666
6767 case ' h' :
@@ -76,17 +76,17 @@ int main(int argc, char** argv)
7676
7777 if (monitoringURI == nullptr ) {
7878 printf (" Unspecified monitoring URI.\n " );
79- isOk = 0 ;
79+ isOk = false ;
8080 }
8181
8282 if (monitoringMetric == nullptr ) {
8383 printf (" Unspecified monitoring metric.\n " );
84- isOk = 0 ;
84+ isOk = false ;
8585 }
8686
8787 if (monitoringValue == nullptr ) {
8888 printf (" Unspecified monitoring value.\n " );
89- isOk = 0 ;
89+ isOk = false ;
9090 }
9191
9292 if (!isOk) {
@@ -109,11 +109,11 @@ int main(int argc, char** argv)
109109 printf (" \n " );
110110 }
111111
112- isOk = 0 ;
112+ isOk = false ;
113113 try {
114114 monitoringCollector = MonitoringFactory::Get (monitoringURI);
115115 monitoringCollector->send ({ monitoringValueI, monitoringMetric });
116- isOk = 1 ;
116+ isOk = true ;
117117 }
118118 catch (const std::exception &exc) {
119119 printf (" Exception: %s\n " , exc.what ());
0 commit comments