aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkraxel <kraxel>2006-08-14 19:38:05 +0000
committerkraxel <kraxel>2006-08-14 19:38:05 +0000
commitc55cef8a5746323a490c488f55303061d031e5fd (patch)
tree8c516d670fbc56311845db1b0cef7a50cb4af659
parentce4746a8a815fa225010bcf268b34c56daf93beb (diff)
downloadfbida-c55cef8a5746323a490c488f55303061d031e5fd.tar.gz
make valgrind happy
-rw-r--r--fb-gui.c1
-rw-r--r--fbi.c2
-rw-r--r--fbtools.c3
3 files changed, 4 insertions, 2 deletions
diff --git a/fb-gui.c b/fb-gui.c
index 2d04685..f49d451 100644
--- a/fb-gui.c
+++ b/fb-gui.c
@@ -231,6 +231,7 @@ void shadow_init(void)
sheight = fb_var.yres;
shadow = malloc(sizeof(unsigned char*) * sheight);
sdirty = malloc(sizeof(unsigned int) * sheight);
+ memset(sdirty,0, sizeof(unsigned int) * sheight);
for (i = 0; i < sheight; i++)
shadow[i] = malloc(swidth*3);
shadow_clear();
diff --git a/fbi.c b/fbi.c
index 8c63401..1a26119 100644
--- a/fbi.c
+++ b/fbi.c
@@ -347,7 +347,7 @@ shadow_draw_image(struct ida_image *img, int xoff, int yoff,
if (100 == weight)
shadow_clear_lines(first, last);
else
- shadow_darkify(0, fb_var.xres, first, last, 100 - weight);
+ shadow_darkify(0, fb_var.xres-1, first, last, 100 - weight);
/* offset for image data (image > screen, select visible area) */
offset = (yoff * img->i.width + xoff) * 3;
diff --git a/fbtools.c b/fbtools.c
index c3be2f6..12dc8fe 100644
--- a/fbtools.c
+++ b/fbtools.c
@@ -340,6 +340,7 @@ fb_init(char *device, char *mode, int vt)
device = getenv("FRAMEBUFFER");
if (NULL == device) {
struct fb_con2fbmap c2m;
+ memset(&c2m, 0, sizeof(c2m));
if (-1 == (fb = open(devices->fb0,O_RDWR /* O_WRONLY */,0))) {
fprintf(stderr,"open %s: %s\n",devices->fb0,strerror(errno));
exit(1);
@@ -351,7 +352,7 @@ fb_init(char *device, char *mode, int vt)
}
close(fb);
fprintf(stderr,"map: vt%02d => fb%d\n",
- c2m.console,c2m.framebuffer);
+ c2m.console, c2m.framebuffer);
sprintf(fbdev,devices->fbnr,c2m.framebuffer);
device = fbdev;
}