aboutsummaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/b64_pton.c5
-rw-r--r--compat/malloc.c2
-rw-r--r--compat/snprintf.c20
3 files changed, 14 insertions, 13 deletions
diff --git a/compat/b64_pton.c b/compat/b64_pton.c
index abe32819e92d..18d8c8e976c2 100644
--- a/compat/b64_pton.c
+++ b/compat/b64_pton.c
@@ -118,15 +118,16 @@ static const char Pad64 = '=';
*/
int
-ldns_b64_pton(char const *src, uint8_t *target, size_t targsize)
+ldns_b64_pton(char const *origsrc, uint8_t *target, size_t targsize)
{
+ unsigned char const* src = (unsigned char*)origsrc;
int tarindex, state, ch;
char *pos;
state = 0;
tarindex = 0;
- if (strlen(src) == 0) {
+ if (strlen(origsrc) == 0) {
return 0;
}
diff --git a/compat/malloc.c b/compat/malloc.c
index bbc632e4f63f..352c6d4796fb 100644
--- a/compat/malloc.c
+++ b/compat/malloc.c
@@ -8,7 +8,7 @@
#include <sys/types.h>
-void *malloc ();
+void *malloc (size_t n);
/* Allocate an N-byte block of memory from the heap.
If N is zero, allocate a 1-byte block. */
diff --git a/compat/snprintf.c b/compat/snprintf.c
index d869ba5e7d05..67ae7eb30c7f 100644
--- a/compat/snprintf.c
+++ b/compat/snprintf.c
@@ -20,16 +20,16 @@
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <ldns/config.h>