summaryrefslogtreecommitdiff
path: root/src/propertywriter.cpp
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-10-19 11:45:12 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-10-24 22:42:07 +0800
commit62e557ec650006f2d3dd614f84804ed1b5cd4349 (patch)
tree369b8c0d95bb3235eaacd520cc6c7aba1d0f5568 /src/propertywriter.cpp
parent6f4cb23385f8818f4373c939f241f1a20596870a (diff)
downloadunity-window-decorator-62e557ec650006f2d3dd614f84804ed1b5cd4349.tar.gz
unity-window-decorator-62e557ec650006f2d3dd614f84804ed1b5cd4349.tar.bz2
core: general code cleanup (static analysis)
Diffstat (limited to 'src/propertywriter.cpp')
-rw-r--r--src/propertywriter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/propertywriter.cpp b/src/propertywriter.cpp
index 9c0eea4..44e7990 100644
--- a/src/propertywriter.cpp
+++ b/src/propertywriter.cpp
@@ -135,8 +135,7 @@ PropertyWriter::readProperty (Window id)
Atom type;
int retval, fmt;
unsigned long nitems, exbyte;
- long int *data;
- int count = 0;
+ long int *data;
if (mPropertyValues.empty ())
return mPropertyValues;
@@ -148,6 +147,8 @@ PropertyWriter::readProperty (Window id)
if (retval == Success && !mPropertyValues.empty ())
{
+ int count = 0;
+
if (type == XA_CARDINAL && fmt == 32 &&
nitems == mPropertyValues.size ())
{