efreet: replace 4096 with sizeof(buf) in snprintf(buf, 4096, ...).
authorAdrien Nader <adrien@notk.org>
Sat, 9 Aug 2014 10:18:31 +0000 (12:18 +0200)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 14 Aug 2014 11:55:58 +0000 (20:55 +0900)
buf is a local variable defined as:
  char buf[4096];
The current code is correct; this change only makes sure the value won't
get out-of-sync later on.

src/lib/efreet/efreet_base.c

index 7a20a9c..f43b1dd 100644 (file)
@@ -305,7 +305,7 @@ efreet_dirs_init(void)
 
     /* xdg_data_dirs */
 #ifdef _WIN32
-    snprintf(buf, 4096, "%s\\Efl;" DATA_DIR ";/usr/share;/usr/local/share", getenv("APPDATA"));
+    snprintf(buf, sizeof(buf), "%s\\Efl;" DATA_DIR ";/usr/share;/usr/local/share", getenv("APPDATA"));
     xdg_data_dirs = efreet_dirs_get("XDG_DATA_DIRS", buf);
 #else
     xdg_data_dirs = efreet_dirs_get("XDG_DATA_DIRS",