The function wasn't used and caused a compiler warning:
url.c:1288:1: warning: 'shorten_length' defined but not used [-Wunused-function]
---
src/url.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/url.c b/src/url.c
index f32c726..eda1f54 100644
--- a/src/url.c
+++ b/src/url.c
@@ -1284,16 +1284,6 @@ append_null (struct growable *dest)
*TAIL (dest) = 0;
}
-/* Shorten DEST to LENGTH. */
-static void
-shorten_length (size_t length, struct growable *dest)
-{
- if (length < dest->tail)
- dest->tail = length;
-
- append_null (dest);
-}
-
/* Append CH to DEST. */
static void
append_char (char ch, struct growable *dest)
--
1.9.1
--
/ daniel.haxx.seFrom 563ea99bca8c2ecb2674708fa909041d7e08a9df Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <[email protected]>
Date: Tue, 25 Mar 2014 11:56:58 +0100
Subject: [PATCH] url: remove shorten_string
The function wasn't used and caused a compiler warning:
url.c:1288:1: warning: 'shorten_length' defined but not used [-Wunused-function]
---
src/url.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/url.c b/src/url.c
index f32c726..eda1f54 100644
--- a/src/url.c
+++ b/src/url.c
@@ -1284,16 +1284,6 @@ append_null (struct growable *dest)
*TAIL (dest) = 0;
}
-/* Shorten DEST to LENGTH. */
-static void
-shorten_length (size_t length, struct growable *dest)
-{
- if (length < dest->tail)
- dest->tail = length;
-
- append_null (dest);
-}
-
/* Append CH to DEST. */
static void
append_char (char ch, struct growable *dest)
--
1.9.1