summary refs log tree commit diff
path: root/src/libnm-std-aux
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnm-std-aux')
-rw-r--r--src/libnm-std-aux/README.md16
-rw-r--r--src/libnm-std-aux/nm-linux-compat.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/src/libnm-std-aux/README.md b/src/libnm-std-aux/README.md
new file mode 100644
index 00000000..ccc48e9d
--- /dev/null
+++ b/src/libnm-std-aux/README.md
@@ -0,0 +1,16 @@
+libnm-std-aux
+=============
+
+A static helper library with general purpose helpers on top of
+standard C (C11).
+
+As this has no additional dependencies, we should have all our C code
+use this internal helper library. It contains helpers that should be
+available (and used) everywhere where we write C.
+
+Our C is gnu11, that is C11 or newer with some GCC-ism. The requirement
+is that it is supported by all complilers we care about (in pratice GCC
+and Clang).
+
+Parts of this library are usually already included via the `nm-default*.h`
+headers.
diff --git a/src/libnm-std-aux/nm-linux-compat.h b/src/libnm-std-aux/nm-linux-compat.h
index 2b04b0df..9bfdb365 100644
--- a/src/libnm-std-aux/nm-linux-compat.h
+++ b/src/libnm-std-aux/nm-linux-compat.h
@@ -16,7 +16,7 @@
 #include <linux/const.h>
 
 #ifndef __KERNEL_DIV_ROUND_UP
-#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) -1) / (d))
+#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
 #endif
 
 #include "linux-headers/ethtool.h"