mirror of
https://github.com/openbsd/src.git
synced 2026-06-18 23:33:33 +02:00
strmode takes a mode_t, not an int; prompted by Collin Funk.
ok kettenis@ deraadt@ tb@
This commit is contained in:
+3
-3
@@ -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 <sys/cdefs.h>
|
||||
#include <sys/_null.h>
|
||||
#include <machine/_types.h>
|
||||
#include <sys/_types.h>
|
||||
|
||||
/*
|
||||
* 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);
|
||||
|
||||
@@ -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 <sys/stat.h>
|
||||
#include <string.h>
|
||||
|
||||
/* XXX mode should be mode_t */
|
||||
|
||||
void
|
||||
strmode(int mode, char *p)
|
||||
strmode(mode_t mode, char *p)
|
||||
{
|
||||
/* print type */
|
||||
switch (mode & S_IFMT) {
|
||||
|
||||
Reference in New Issue
Block a user