summaryrefslogtreecommitdiff
path: root/test/color_name.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/color_name.h')
-rw-r--r--test/color_name.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/color_name.h b/test/color_name.h
index 0dadd2a..867396c 100644
--- a/test/color_name.h
+++ b/test/color_name.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 2011-2012,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -27,7 +27,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: color_name.h,v 1.7 2020/02/02 23:34:34 tom Exp $
+ * $Id: color_name.h,v 1.9 2021/04/24 23:25:29 tom Exp $
*/
#ifndef __COLORNAME_H
@@ -37,7 +37,7 @@
#include <test.priv.h>
#endif
-static NCURSES_CONST char *the_color_names[] =
+static NCURSES_CONST char *const the_color_names[] =
{
"black",
"red",
@@ -90,7 +90,7 @@ color_name(int color)
const char *result = 0;
if (color >= (int) SIZEOF(the_color_names)) {
- _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(result)) "%d", color);
+ _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "%d", color);
result = temp;
} else if (color < 0) {
result = "default";