tools: ynl-gen: complete the C keyword list
authorJakub Kicinski <kuba@kernel.org>
Thu, 8 Jun 2023 21:11:51 +0000 (14:11 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Jun 2023 21:40:31 +0000 (14:40 -0700)
C keywords need to be avoided when naming things.
Complete the list (ethtool has at least one thing called "auto").

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/ynl-gen-c.py

index e1b86b1..9b6ff25 100755 (executable)
@@ -1172,7 +1172,40 @@ op_mode_to_wrapper = {
 }
 
 _C_KW = {
-    'do'
+    'auto',
+    'bool',
+    'break',
+    'case',
+    'char',
+    'const',
+    'continue',
+    'default',
+    'do',
+    'double',
+    'else',
+    'enum',
+    'extern',
+    'float',
+    'for',
+    'goto',
+    'if',
+    'inline',
+    'int',
+    'long',
+    'register',
+    'return',
+    'short',
+    'signed',
+    'sizeof',
+    'static',
+    'struct',
+    'switch',
+    'typedef',
+    'union',
+    'unsigned',
+    'void',
+    'volatile',
+    'while'
 }