Remove warnings and performance problems reported by cppcheck.
[platform/core/security/key-manager.git] / tools / ckm_tool.cpp
index 0af2980..ff9f6da 100644 (file)
@@ -53,9 +53,9 @@ int main(int argc, char* argv[])
     // simple input arg parser
     for (int i=1; i<argc-1; i++)
     {
-        long int uid;
         if(!strcmp(argv[i], "-d"))
         {
+            long int uid;
             if(parseLong(argv[i+1], uid) || uid<0) {
                 cerr << "parameter error: invalid UID provided to the -d option" << endl;
                 exit(-2);