[FIX] Remove no-op assignments 21/16021/3
authorDmitry Bogatov <d.bogatov@samsung.com>
Fri, 31 Jan 2014 08:08:14 +0000 (12:08 +0400)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Fri, 28 Mar 2014 08:05:23 +0000 (01:05 -0700)
Change-Id: I20cb99efb31c4e2903239a5ec9a65cc3061f6429
Signed-off-by: Dmitry Bogatov <d.bogatov@samsung.com>
daemon/sys_stat.c

index ea9f2c1..95684f9 100644 (file)
@@ -535,8 +535,7 @@ static int parse_proc_smaps_file_bypid(char *path, proc_t* P)
                        }
                        else if(strncmp(buf, "Shared", 6) == 0) // line is started with "Shared"
                        {
-                               char *p = buf;
-                               p = strstr(buf, ":");
+                               char *p = strstr(buf, ":");
                                if (p != 0) {
                                        sscanf(p, ":%s kB", numbuf);
                                        P->sh_mem += atoi(numbuf);
@@ -577,8 +576,7 @@ static int parse_proc_smaps_file_bypid(char *path, proc_t* P)
                        }
                        else if(strncmp(buf, "Shared", 6) == 0) // line is started with "Shared"
                        {
-                               char *p = buf;
-                               p = strstr(buf, ":");
+                               char *p = strstr(buf, ":");
                                if (p != 0) {
                                        sscanf(p, ":%s kB", numbuf);
                                        P->sh_mem += atoi(numbuf);