From: Enlightenment S. <no-...@en...> - 2009-06-08 23:25:30
|
Log: remove compile warning Author: pfritz Date: 2009-06-08 16:25:26 -0700 (Mon, 08 Jun 2009) New Revision: 40977 Modified: trunk/E16/e/src/theme.c Modified: trunk/E16/e/src/theme.c =================================================================== --- trunk/E16/e/src/theme.c 2009-06-08 20:47:07 UTC (rev 40976) +++ trunk/E16/e/src/theme.c 2009-06-08 23:25:26 UTC (rev 40977) @@ -198,7 +198,8 @@ char s[FILEPATH_LEN_MAX]; char th[FILEPATH_LEN_MAX]; FILE *f; - unsigned char buf[320]; + unsigned char buf[262]; + size_t ret; char *name; /* its a directory - just use it "as is" */ @@ -215,7 +216,8 @@ f = fopen(path, "r"); if (!f) return NULL; - fread(buf, 1, 320, f); + ret = fread(buf, 1, sizeof(buf), f); + memset(buf + ret, 0, sizeof(buf) - ret); fclose(f); name = fileof(path); |