aboutsummaryrefslogtreecommitdiffstats
path: root/pseudo_util.c
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2014-06-13 13:37:05 -0500
committerPeter Seebach <peter.seebach@windriver.com>2014-06-13 13:37:05 -0500
commitde1ca4c80976f64bff3d317e2082a6782b4c54ab (patch)
treea01d3222804bd47273075e747ccf6295fe8dada1 /pseudo_util.c
parentd2198c6537031dd1d75f9bcdf601f67a370b75b5 (diff)
downloadpseudo-de1ca4c80976f64bff3d317e2082a6782b4c54ab.tar.gz
pseudo-de1ca4c80976f64bff3d317e2082a6782b4c54ab.tar.bz2
pseudo-de1ca4c80976f64bff3d317e2082a6782b4c54ab.zip
Use constant initializer for static
strlen(array) isn't a constant expression, even though gcc can sometimes figure it out at compile time.
Diffstat (limited to 'pseudo_util.c')
-rw-r--r--pseudo_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pseudo_util.c b/pseudo_util.c
index 325cabf..e4e1fc8 100644
--- a/pseudo_util.c
+++ b/pseudo_util.c
@@ -98,7 +98,7 @@ dump_env(char **envp) {
int
pseudo_has_unload(char * const *envp) {
static const char unload[] = "PSEUDO_UNLOAD";
- static size_t unload_len = strlen(unload);
+ static size_t unload_len = sizeof(unload) - 1;
size_t i = 0;
/* Is it in the caller environment? */