summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorotto <>2024-06-23 07:08:26 +0000
committerotto <>2024-06-23 07:08:26 +0000
commit9d029573e8765a9d9fed5e12431b00b36c9c90bd (patch)
tree20fa1300b677bb5e34bc406798745d60bc17c3e1
parent3ec102476e9614e5f4e64893dd3ae358a29982db (diff)
downloadopenbsd-9d029573e8765a9d9fed5e12431b00b36c9c90bd.tar.gz
openbsd-9d029573e8765a9d9fed5e12431b00b36c9c90bd.tar.bz2
openbsd-9d029573e8765a9d9fed5e12431b00b36c9c90bd.zip
strmode takes a mode_t, not an int; prompted by Collin Funk.
ok kettenis@ deraadt@ tb@
-rw-r--r--src/lib/libc/string/strmode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libc/string/strmode.c b/src/lib/libc/string/strmode.c
index 609b8931fb..c57fe74b23 100644
--- a/src/lib/libc/string/strmode.c
+++ b/src/lib/libc/string/strmode.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: strmode.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */ 1/* $OpenBSD: strmode.c,v 1.9 2024/06/23 07:08:26 otto Exp $ */
2/*- 2/*-
3 * Copyright (c) 1990 The Regents of the University of California. 3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -32,10 +32,8 @@
32#include <sys/stat.h> 32#include <sys/stat.h>
33#include <string.h> 33#include <string.h>
34 34
35/* XXX mode should be mode_t */
36
37void 35void
38strmode(int mode, char *p) 36strmode(mode_t mode, char *p)
39{ 37{
40 /* print type */ 38 /* print type */
41 switch (mode & S_IFMT) { 39 switch (mode & S_IFMT) {