[PATCH] manual: tidy the longopt.c example

Samuel Zeter samuelzeter@gmail.com
Tue Mar 25 08:00:33 GMT 2025


- Change longopt.c's backticks to single quotes
- puts() does not use format specifiers
---
 manual/examples/longopt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/manual/examples/longopt.c b/manual/examples/longopt.c
index c679cd27c3..bf3857b9b1 100644
--- a/manual/examples/longopt.c
+++ b/manual/examples/longopt.c
@@ -66,23 +66,23 @@ main (int argc, char **argv)
 	  break;
 
 	case 'a':
-	  puts ("option -a\n");
+	  puts ("option -a");
 	  break;
 
 	case 'b':
-	  puts ("option -b\n");
+	  puts ("option -b");
 	  break;
 
 	case 'c':
-	  printf ("option -c with value `%s'\n", optarg);
+	  printf ("option -c with value '%s'\n", optarg);
 	  break;
 
 	case 'd':
-	  printf ("option -d with value `%s'\n", optarg);
+	  printf ("option -d with value '%s'\n", optarg);
 	  break;
 
 	case 'f':
-	  printf ("option -f with value `%s'\n", optarg);
+	  printf ("option -f with value '%s'\n", optarg);
 	  break;
 
 	case '?':
-- 
2.49.0



More information about the Libc-alpha mailing list