chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Properly check for overflow in offsets
[elogind.git]
/
src
/
shared
/
unit-name.c
diff --git
a/src/shared/unit-name.c
b/src/shared/unit-name.c
index 06bbfacb0081d06c83441f92ab9a3f83a07f29b0..a809713595f69b10849f97c9a0e7637c9f77ac59 100644
(file)
--- a/
src/shared/unit-name.c
+++ b/
src/shared/unit-name.c
@@
-33,7
+33,7
@@
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
":-_.\\"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
":-_.\\"
-const char* const unit_type_table[_UNIT_TYPE_MAX] = {
+
static
const char* const unit_type_table[_UNIT_TYPE_MAX] = {
[UNIT_SERVICE] = "service",
[UNIT_SOCKET] = "socket",
[UNIT_TARGET] = "target",
[UNIT_SERVICE] = "service",
[UNIT_SOCKET] = "socket",
[UNIT_TARGET] = "target",
@@
-48,7
+48,7
@@
const char* const unit_type_table[_UNIT_TYPE_MAX] = {
DEFINE_STRING_TABLE_LOOKUP(unit_type, UnitType);
DEFINE_STRING_TABLE_LOOKUP(unit_type, UnitType);
-const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = {
+
static
const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = {
[UNIT_STUB] = "stub",
[UNIT_LOADED] = "loaded",
[UNIT_ERROR] = "error",
[UNIT_STUB] = "stub",
[UNIT_LOADED] = "loaded",
[UNIT_ERROR] = "error",