summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2015-02-08 06:01:25 +0000
committertedu <tedu@openbsd.org>2015-02-08 06:01:25 +0000
commitcfb4977b37703c9f8c6d7fc0e8203080be4db439 (patch)
tree3c62ddd44e230da54ebfb94935a53a86655b89c2
parentIntroduce if_input() a function to pass packets dequeued from a (diff)
downloadwireguard-openbsd-cfb4977b37703c9f8c6d7fc0e8203080be4db439.tar.xz
wireguard-openbsd-cfb4977b37703c9f8c6d7fc0e8203080be4db439.zip
remove ptr_t typedef. void * is good enough for csh.
-rw-r--r--bin/csh/alloc.c18
-rw-r--r--bin/csh/csh.h4
-rw-r--r--bin/csh/extern.h12
-rw-r--r--bin/csh/glob.c4
4 files changed, 18 insertions, 20 deletions
diff --git a/bin/csh/alloc.c b/bin/csh/alloc.c
index 16b3aadc60d..e59597970a4 100644
--- a/bin/csh/alloc.c
+++ b/bin/csh/alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: alloc.c,v 1.15 2015/02/08 05:47:28 tedu Exp $ */
+/* $OpenBSD: alloc.c,v 1.16 2015/02/08 06:01:25 tedu Exp $ */
/* $NetBSD: alloc.c,v 1.6 1995/03/21 09:02:23 cgd Exp $ */
/*-
@@ -38,10 +38,10 @@
#include "csh.h"
#include "extern.h"
-ptr_t
+void *
Malloc(size_t n)
{
- ptr_t ptr;
+ void *ptr;
if ((ptr = malloc(n)) == NULL) {
child++;
@@ -50,10 +50,10 @@ Malloc(size_t n)
return (ptr);
}
-ptr_t
-Reallocarray(ptr_t p, size_t c, size_t n)
+void *
+Reallocarray(void * p, size_t c, size_t n)
{
- ptr_t ptr;
+ void *ptr;
if ((ptr = reallocarray(p, c, n)) == NULL) {
child++;
@@ -62,10 +62,10 @@ Reallocarray(ptr_t p, size_t c, size_t n)
return (ptr);
}
-ptr_t
+void *
Calloc(size_t s, size_t n)
{
- ptr_t ptr;
+ void *ptr;
if ((ptr = calloc(s, n)) == NULL) {
child++;
@@ -76,7 +76,7 @@ Calloc(size_t s, size_t n)
}
void
-Free(ptr_t p)
+Free(void *p)
{
free(p);
}
diff --git a/bin/csh/csh.h b/bin/csh/csh.h
index e0b85d309d3..4c3c10b2c5b 100644
--- a/bin/csh/csh.h
+++ b/bin/csh/csh.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: csh.h,v 1.20 2015/01/19 18:20:47 deraadt Exp $ */
+/* $OpenBSD: csh.h,v 1.21 2015/02/08 06:01:25 tedu Exp $ */
/* $NetBSD: csh.h,v 1.9 1995/03/21 09:02:40 cgd Exp $ */
/*-
@@ -75,8 +75,6 @@ typedef char Char;
typedef void *ioctl_t; /* Third arg of ioctl */
-typedef void *ptr_t;
-
#include "const.h"
#include "char.h"
#include "error.h"
diff --git a/bin/csh/extern.h b/bin/csh/extern.h
index 207851ff101..6c7e8a119b2 100644
--- a/bin/csh/extern.h
+++ b/bin/csh/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.19 2014/10/17 06:17:37 deraadt Exp $ */
+/* $OpenBSD: extern.h,v 1.20 2015/02/08 06:01:25 tedu Exp $ */
/* $NetBSD: extern.h,v 1.8 1996/10/31 23:50:54 christos Exp $ */
/*-
@@ -160,7 +160,7 @@ void rscan(Char **, void (*)(int));
void tglob(Char **);
void trim(Char **);
#ifdef FILEC
-int sortscmp(const ptr_t, const ptr_t);
+int sortscmp(const void *, const void *);
#endif /* FILEC */
/*
@@ -294,10 +294,10 @@ void psecs(long);
/*
* alloc.c
*/
-void Free(ptr_t);
-ptr_t Malloc(size_t);
-ptr_t Reallocarray(ptr_t, size_t, size_t);
-ptr_t Calloc(size_t, size_t);
+void Free(void *);
+void * Malloc(size_t);
+void * Reallocarray(void *, size_t, size_t);
+void * Calloc(size_t, size_t);
/*
* str.c:
diff --git a/bin/csh/glob.c b/bin/csh/glob.c
index a26a75fe80c..cebc598c8ab 100644
--- a/bin/csh/glob.c
+++ b/bin/csh/glob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glob.c,v 1.16 2015/02/08 05:47:28 tedu Exp $ */
+/* $OpenBSD: glob.c,v 1.17 2015/02/08 06:01:25 tedu Exp $ */
/* $NetBSD: glob.c,v 1.10 1995/03/21 09:03:01 cgd Exp $ */
/*-
@@ -877,7 +877,7 @@ Gcat(Char *s1, Char *s2)
#ifdef FILEC
int
-sortscmp(ptr_t a, ptr_t b)
+sortscmp(const void *a, const void *b)
{
#if defined(NLS) && !defined(NOSTRCOLL)
char buf[2048];