From: otto Date: Sun, 23 Jun 2024 07:08:26 +0000 (+0000) Subject: strmode takes a mode_t, not an int; prompted by Collin Funk. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bc8a30fccf976a62190688a60cf440be3b3cb43e;p=openbsd strmode takes a mode_t, not an int; prompted by Collin Funk. ok kettenis@ deraadt@ tb@ --- diff --git a/include/string.h b/include/string.h index 9141c300004..f1d0cbc81fd 100644 --- a/include/string.h +++ b/include/string.h @@ -1,4 +1,4 @@ -/* $OpenBSD: string.h,v 1.32 2017/09/05 03:16:13 schwarze Exp $ */ +/* $OpenBSD: string.h,v 1.33 2024/06/23 07:08:26 otto Exp $ */ /* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */ /*- @@ -37,7 +37,7 @@ #include #include -#include +#include /* * POSIX mandates that certain string functions not present in ISO C @@ -128,7 +128,7 @@ size_t strlcat(char *, const char *, size_t) __attribute__ ((__bounded__(__string__,1,3))); size_t strlcpy(char *, const char *, size_t) __attribute__ ((__bounded__(__string__,1,3))); -void strmode(int, char *); +void strmode(__mode_t, char *); char *strsep(char **, const char *); int timingsafe_bcmp(const void *, const void *, size_t); int timingsafe_memcmp(const void *, const void *, size_t); diff --git a/lib/libc/string/strmode.c b/lib/libc/string/strmode.c index 609b8931fbb..c57fe74b237 100644 --- a/lib/libc/string/strmode.c +++ b/lib/libc/string/strmode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strmode.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */ +/* $OpenBSD: strmode.c,v 1.9 2024/06/23 07:08:26 otto Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -32,10 +32,8 @@ #include #include -/* XXX mode should be mode_t */ - void -strmode(int mode, char *p) +strmode(mode_t mode, char *p) { /* print type */ switch (mode & S_IFMT) {