chiark / gitweb /
doc: typographical improvements and choice of words
[elogind.git] / CODING_STYLE
index cb8d96c4cb98bf6816e1f5bf3cb8bb0b6510813d..e19294412425b7feb87c4dfe7507957a73552ec0 100644 (file)
 - Don't synchronously talk to any other service from PID 1, due to
   risk of deadlocks
 
-- Avoid fixed sized string buffers, unless you really know the maximum
+- Avoid fixed-size string buffers, unless you really know the maximum
   size and that maximum size is small. They are a source of errors,
-  since they possibly result in truncated strings. Often it is nicer
-  to use dynamic memory, alloca() or VLAs. If you do allocate fixed
-  size strings on the stack, then it's probably only OK if you either
+  since they possibly result in truncated strings. It is often nicer
+  to use dynamic memory, alloca() or VLAs. If you do allocate fixed-size
+  strings on the stack, then it's probably only OK if you either
   use a maximum size such as LINE_MAX, or count in detail the maximum
   size a string can have. (DECIMAL_STR_MAX and DECIMAL_STR_WIDTH
   macros are your friends for this!)
@@ -99,7 +99,7 @@
 
 - Unless you allocate an array, "double" is always the better choice
   than "float". Processors speak "double" natively anyway, so this is
-  no speed benefit, and on calls like printf() "float"s get upgraded
+  no speed benefit, and on calls like printf() "float"s get promoted
   to "double"s anyway, so there is no point.
 
 - Don't invoke functions when you allocate variables on the stack. Wrong: