evas vg: fix correct increment for tflags 20/200620/1
authorYeongjong Lee <yj34.lee@samsung.com>
Thu, 21 Feb 2019 05:17:18 +0000 (14:17 +0900)
committerHermet Park <hermetpark@gmail.com>
Wed, 27 Feb 2019 10:08:10 +0000 (19:08 +0900)
Summary:
There is warning.

```
lib/evas/vg/evas_vg_cache.c: In function ‘_vg_file_save’:
lib/evas/vg/evas_vg_cache.c:185:30: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
         tflags = alloca(len) + 1;
```
Previous code of a8d5f275c78 is intended to increase flags length.

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7972

Change-Id: I3c107dac3bbdf7863d42cf1abc2826bc02d1ed34

src/lib/evas/vg/evas_vg_cache.c

index 262127a..c2cfdf3 100644 (file)
@@ -191,8 +191,8 @@ _vg_file_save(Vg_File_Data *vfd, const char *file, const char *key, const char *
         char *p, *pp;
         char *tflags;
 
-        int len = strlen(flags);
-        tflags = alloca(len) + 1;
+        int len = strlen(flags) + 1;
+        tflags = alloca(len);
         strncpy(tflags, flags, len);
         p = tflags;
         while (p)