summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-08-27 22:57:47 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-09-22 01:58:22 -0700
commit216e340ed6ef2c0882911d351aa7c3703b347613 (patch)
tree99de77da079689f1cdbe2431fe4cb0d634c0ea67
parent0e9bac3a27f8e956911b787329bec6bf81d9c004 (diff)
downloadgnulib-216e340ed6ef2c0882911d351aa7c3703b347613.tar.gz
misc: don't limit commentary to inline functions
* lib/binary-io.h, lib/malloca.h, lib/safe-alloc.c: * lib/xalloc-oversized.h, lib/xsize.h: Contrast macros to functions in general, not just to inline functions, when the commentary does not apply only to inline functions.
-rw-r--r--ChangeLog8
-rw-r--r--lib/binary-io.h2
-rw-r--r--lib/malloca.h2
-rw-r--r--lib/safe-alloc.c2
-rw-r--r--lib/xalloc-oversized.h2
-rw-r--r--lib/xsize.h2
6 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index da8afa2854..454ee62f08 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ misc: don't limit commentary to inline functions
+ * lib/binary-io.h, lib/malloca.h, lib/safe-alloc.c:
+ * lib/xalloc-oversized.h, lib/xsize.h:
+ Contrast macros to functions in general, not just to inline functions,
+ when the commentary does not apply only to inline functions.
+
2012-09-20 Jim Meyering <meyering@redhat.com>
non-recursive-gnulib-prefix-hack: new module
diff --git a/lib/binary-io.h b/lib/binary-io.h
index a33e32aee2..71c0142984 100644
--- a/lib/binary-io.h
+++ b/lib/binary-io.h
@@ -39,7 +39,7 @@
# endif
#else
/* On reasonable systems, binary I/O is the only choice. */
- /* Use an inline function rather than a macro, to avoid gcc warnings
+ /* Use a function rather than a macro, to avoid gcc warnings
"warning: statement with no effect". */
static inline int
set_binary_mode (int fd, int mode)
diff --git a/lib/malloca.h b/lib/malloca.h
index 4b60cbae78..89f8c0f1ae 100644
--- a/lib/malloca.h
+++ b/lib/malloca.h
@@ -42,7 +42,7 @@ extern "C" {
and a page size can be as small as 4096 bytes. So we cannot safely
allocate anything larger than 4096 bytes. Also care for the possibility
of a few compiler-allocated temporary stack slots.
- This must be a macro, not an inline function. */
+ This must be a macro, not a function. */
# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
#else
# define safe_alloca(N) ((void) (N), NULL)
diff --git a/lib/safe-alloc.c b/lib/safe-alloc.c
index c68bf6205b..641b395b41 100644
--- a/lib/safe-alloc.c
+++ b/lib/safe-alloc.c
@@ -29,7 +29,7 @@
/* Return 1 if an array of N objects, each of size S, cannot exist due
to size arithmetic overflow. S must be positive and N must be
- nonnegative. This is a macro, not an inline function, so that it
+ nonnegative. This is a macro, not a function, so that it
works correctly even when SIZE_MAX < N.
By gnulib convention, SIZE_MAX represents overflow in size
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index 6779755983..ad777d8dd7 100644
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -22,7 +22,7 @@
/* Return 1 if an array of N objects, each of size S, cannot exist due
to size arithmetic overflow. S must be positive and N must be
- nonnegative. This is a macro, not an inline function, so that it
+ nonnegative. This is a macro, not a function, so that it
works correctly even when SIZE_MAX < N.
By gnulib convention, SIZE_MAX represents overflow in size
diff --git a/lib/xsize.h b/lib/xsize.h
index 927e41e851..fdac109940 100644
--- a/lib/xsize.h
+++ b/lib/xsize.h
@@ -92,7 +92,7 @@ xmax (size_t size1, size_t size2)
/* Multiplication of a count with an element size, with overflow check.
The count must be >= 0 and the element size must be > 0.
- This is a macro, not an inline function, so that it works correctly even
+ This is a macro, not a function, so that it works correctly even
when N is of a wider type and N > SIZE_MAX. */
#define xtimes(N, ELSIZE) \
((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)