All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] utf8.c: mark utf{16,32}_{be,le}_bom symbols static
@ 2018-01-04 17:20 Ramsay Jones
  0 siblings, 0 replies; only message in thread
From: Ramsay Jones @ 2018-01-04 17:20 UTC (permalink / raw)
  To: Lars Schneider; +Cc: Junio C Hamano, GIT Mailing-list


Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Lars,

If you need to re-roll your 'ls/checkout-encoding' branch, could you
please squash this into the relevant patch (commit d5318db2d0,
"utf8: add function to detect prohibited UTF-16/32 BOM", 2017-12-31).

[yes, noticed by sparse].

Thanks!

ATB,
Ramsay Jones

 utf8.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/utf8.c b/utf8.c
index 1978d6c42..f033fec1c 100644
--- a/utf8.c
+++ b/utf8.c
@@ -544,10 +544,10 @@ static int has_bom_prefix(const char *data, size_t len,
 	return (len >= bom_len) && !memcmp(data, bom, bom_len);
 }
 
-const char utf16_be_bom[] = {0xFE, 0xFF};
-const char utf16_le_bom[] = {0xFF, 0xFE};
-const char utf32_be_bom[] = {0x00, 0x00, 0xFE, 0xFF};
-const char utf32_le_bom[] = {0xFF, 0xFE, 0x00, 0x00};
+static const char utf16_be_bom[] = {0xFE, 0xFF};
+static const char utf16_le_bom[] = {0xFF, 0xFE};
+static const char utf32_be_bom[] = {0x00, 0x00, 0xFE, 0xFF};
+static const char utf32_le_bom[] = {0xFF, 0xFE, 0x00, 0x00};
 
 int has_prohibited_utf_bom(const char *enc, const char *data, size_t len)
 {
-- 
2.15.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-04 17:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-04 17:20 [PATCH] utf8.c: mark utf{16,32}_{be,le}_bom symbols static Ramsay Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.