KyleSchoonover commented on a change in pull request #1481:
URL: https://github.com/apache/avro/pull/1481#discussion_r794715971



##########
File path: lang/csharp/src/apache/codegen/AvroGen.cs
##########
@@ -29,7 +29,8 @@ static int Main(string[] args)
             if (args.Length == 0 || args[0] == "-h" || args[0] == "--help")
             {
                 Usage();
-                return 1;
+                // Return success if help requested
+                return args.Length == 0 ? 1 : 0;

Review comment:
       `            // Print usage if no arguments provided or help requested
               if (args.Length == 0)
               {
                   Usage();
                   return 1;
               }`
   
   ` if (args[0] == "-h" || args[0] == "--help")
               {
                   Usage();
                   return;
               }`
   
   
   This seems cleaner.  No reason to add another evaluation.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to