summaryrefslogtreecommitdiff
path: root/lib/quotearg.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-25 00:17:22 +0000
committerJim Meyering <jim@meyering.net>1999-01-25 00:17:22 +0000
commitcbf82d876b4aa145ec1fd06ac03c854d379621e2 (patch)
tree1bc68e24a2782c641725e217f167b48c2633bfe9 /lib/quotearg.c
parent8c5f91e5ad2f9c4808252caffc0106ef40c072cc (diff)
downloadcoreutils-cbf82d876b4aa145ec1fd06ac03c854d379621e2.tar.xz
(quotearg_n_options): Revert type of parameter `n'
(and hence that of the local `n1', too) to `int' at Paul's request.
Diffstat (limited to 'lib/quotearg.c')
-rw-r--r--lib/quotearg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/quotearg.c b/lib/quotearg.c
index 90d0556d4..6e923a81e 100644
--- a/lib/quotearg.c
+++ b/lib/quotearg.c
@@ -299,9 +299,10 @@ quotearg_buffer (char *buffer, size_t buffersize,
OPTIONS specifies the quoting options.
The returned value points to static storage that can be
reused by the next call to this function with the same value of N.
- N must be nonnegative. */
+ N must be nonnegative. N is deliberately declared with type `int'
+ to allow for future extensions (using negative values). */
static char *
-quotearg_n_options (unsigned int n, char const *arg,
+quotearg_n_options (int n, char const *arg,
struct quoting_options const *options)
{
static unsigned int nslots;
@@ -313,7 +314,7 @@ quotearg_n_options (unsigned int n, char const *arg,
if (nslots <= n)
{
- unsigned int n1 = n + 1;
+ int n1 = n + 1;
size_t s = n1 * sizeof (struct slotvec);
if (! (0 < n1 && n1 == s / sizeof (struct slotvec)))
abort ();