Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/file/dist/src If we don't have any formatting c...
details: https://anonhg.NetBSD.org/src/rev/12b79986efb7
branches: trunk
changeset: 358106:12b79986efb7
user: christos <christos%NetBSD.org@localhost>
date: Mon Dec 11 23:19:38 2017 +0000
description:
If we don't have any formatting characters, we are always ok.
diffstat:
external/bsd/file/dist/src/softmagic.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r ace47dc61cb7 -r 12b79986efb7 external/bsd/file/dist/src/softmagic.c
--- a/external/bsd/file/dist/src/softmagic.c Mon Dec 11 23:07:49 2017 +0000
+++ b/external/bsd/file/dist/src/softmagic.c Mon Dec 11 23:19:38 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: softmagic.c,v 1.17 2017/09/08 13:40:25 christos Exp $ */
+/* $NetBSD: softmagic.c,v 1.18 2017/12/11 23:19:38 christos Exp $ */
/*
* Copyright (c) Ian F. Darwin 1986-1995.
@@ -37,7 +37,7 @@
#if 0
FILE_RCSID("@(#)$File: softmagic.c,v 1.249 2017/06/19 18:30:25 christos Exp $")
#else
-__RCSID("$NetBSD: softmagic.c,v 1.17 2017/09/08 13:40:25 christos Exp $");
+__RCSID("$NetBSD: softmagic.c,v 1.18 2017/12/11 23:19:38 christos Exp $");
#endif
#endif /* lint */
@@ -127,6 +127,8 @@
file_fmtcheck(struct magic_set *ms, const struct magic *m, const char *def,
const char *file, size_t line)
{
+ if (strchr(m->desc, '%') == NULL)
+ return m->desc;
const char *ptr = fmtcheck(m->desc, def);
if (ptr == def)
file_magerror(ms,
Home |
Main Index |
Thread Index |
Old Index