aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfonso <gfunni234@gmail.com>2021-07-07 14:52:21 +0000
committerWarner Losh <imp@FreeBSD.org>2021-12-06 15:54:09 +0000
commit7adc66ea8151a808839c900f8ddfe84fcc2e8909 (patch)
tree56ffb67622734459d5b6f62893cadfedf8bf7619
parent3f22f161b936b6279a68d6e9439b30f2abb50cad (diff)
downloadsrc-7adc66ea8151a808839c900f8ddfe84fcc2e8909.tar.gz
src-7adc66ea8151a808839c900f8ddfe84fcc2e8909.zip
ANSIify libsa functions
Convert libsa files to use ANSI function definitions. Pull request: https://github.com/freebsd/freebsd-src/pull/508 [ cut and paste error corrected ] (cherry picked from commit 1f629966d683ca2e79adbc6c39e7ec5f1a87832f)
-rw-r--r--stand/libsa/dev.c9
-rw-r--r--stand/libsa/in_cksum.c4
-rw-r--r--stand/libsa/inet_ntoa.c3
-rw-r--r--stand/libsa/stat.c4
-rw-r--r--stand/libsa/strcasecmp.c7
-rw-r--r--stand/libsa/strdup.c3
6 files changed, 9 insertions, 21 deletions
diff --git a/stand/libsa/dev.c b/stand/libsa/dev.c
index 20f3100852e7..1d1dd075580e 100644
--- a/stand/libsa/dev.c
+++ b/stand/libsa/dev.c
@@ -40,22 +40,19 @@ __FBSDID("$FreeBSD$");
#include "stand.h"
int
-nodev()
+nodev(void)
{
return (ENXIO);
}
void
-nullsys()
+nullsys(void)
{
}
/* ARGSUSED */
int
-noioctl(f, cmd, data)
- struct open_file *f;
- u_long cmd;
- void *data;
+noioctl(struct open_file *f __unused, u_long cmd __unused, void *data __unused)
{
return (EINVAL);
}
diff --git a/stand/libsa/in_cksum.c b/stand/libsa/in_cksum.c
index 97782152d71d..2f8c448fc0eb 100644
--- a/stand/libsa/in_cksum.c
+++ b/stand/libsa/in_cksum.c
@@ -50,9 +50,7 @@ __FBSDID("$FreeBSD$");
* In particular, it should not be this one.
*/
int
-in_cksum(p, len)
- void *p;
- int len;
+in_cksum(void *p, int len)
{
int sum = 0, oddbyte = 0, v = 0;
u_char *cp = p;
diff --git a/stand/libsa/inet_ntoa.c b/stand/libsa/inet_ntoa.c
index f675a0ff7736..45c79f26151d 100644
--- a/stand/libsa/inet_ntoa.c
+++ b/stand/libsa/inet_ntoa.c
@@ -45,8 +45,7 @@ static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93";
* to base 256 d.d.d.d representation.
*/
char *
-inet_ntoa(in)
- struct in_addr in;
+inet_ntoa(struct in_addr in)
{
static const char fmt[] = "%u.%u.%u.%u";
static char ret[sizeof "255.255.255.255"];
diff --git a/stand/libsa/stat.c b/stand/libsa/stat.c
index 9875372b441d..f3b198955ab8 100644
--- a/stand/libsa/stat.c
+++ b/stand/libsa/stat.c
@@ -37,9 +37,7 @@ __FBSDID("$FreeBSD$");
#include "stand.h"
int
-stat(str, sb)
- const char *str;
- struct stat *sb;
+stat(const char *str, struct stat *sb)
{
int fd, rv;
diff --git a/stand/libsa/strcasecmp.c b/stand/libsa/strcasecmp.c
index f8131019384c..12ec81b022c4 100644
--- a/stand/libsa/strcasecmp.c
+++ b/stand/libsa/strcasecmp.c
@@ -39,8 +39,7 @@ static char sccsid[] = "@(#)strcasecmp.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
int
-strcasecmp(s1, s2)
- const char *s1, *s2;
+strcasecmp(const char *s1, const char *s2)
{
const u_char
*us1 = (const u_char *)s1,
@@ -53,9 +52,7 @@ strcasecmp(s1, s2)
}
int
-strncasecmp(s1, s2, n)
- const char *s1, *s2;
- size_t n;
+strncasecmp(const char *s1, const char *s2, size_t n)
{
if (n != 0) {
const u_char
diff --git a/stand/libsa/strdup.c b/stand/libsa/strdup.c
index de6c4def8bc6..ad7200c69850 100644
--- a/stand/libsa/strdup.c
+++ b/stand/libsa/strdup.c
@@ -39,8 +39,7 @@ static char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93";
#include <string.h>
char *
-strdup(str)
- const char *str;
+strdup(const char *str)
{
size_t len;
char *copy = NULL;