Sami Kerola
2017-10-19 19:42:07 UTC
* quotearg.c: Avoid signed/unsigned comparison warning
---
lib/quotearg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/quotearg.c b/lib/quotearg.c
index df602698e..1c90df301 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -888,7 +888,7 @@ quotearg_n_options (int n, char const *arg, size_t argsize,
{
bool preallocated = (sv == &slotvec0);
- if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= n)
+ if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= (size_t) n)
xalloc_die ();
slotvec = sv = xrealloc (preallocated ? NULL : sv, (n + 1) * sizeof *sv);
---
lib/quotearg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/quotearg.c b/lib/quotearg.c
index df602698e..1c90df301 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -888,7 +888,7 @@ quotearg_n_options (int n, char const *arg, size_t argsize,
{
bool preallocated = (sv == &slotvec0);
- if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= n)
+ if (MIN (INT_MAX, MIN (PTRDIFF_MAX, SIZE_MAX) / sizeof *sv) <= (size_t) n)
xalloc_die ();
slotvec = sv = xrealloc (preallocated ? NULL : sv, (n + 1) * sizeof *sv);
--
2.14.2
2.14.2