aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zoran
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-09-13 18:07:14 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:06:11 -0400
commit634c6931637093f012df56d489e0b2f7735c235f (patch)
treea5ec579420042a99fbf4698928808b4e68755dde /drivers/media/video/zoran
parent5cac1f665fd18c75c9914ecd3fe808cebfe639f0 (diff)
V4L/DVB: drivers/media/video/zoran: Don't use initialized char array
Just fill the array as necessary and terminate with 0 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/zoran')
-rw-r--r--drivers/media/video/zoran/zoran_device.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/zoran/zoran_device.c b/drivers/media/video/zoran/zoran_device.c
index 6f846abee3e4..b02007e42150 100644
--- a/drivers/media/video/zoran/zoran_device.c
+++ b/drivers/media/video/zoran/zoran_device.c
@@ -1470,8 +1470,7 @@ zoran_irq (int irq,
1470 (zr->codec_mode == BUZ_MODE_MOTION_DECOMPRESS || 1470 (zr->codec_mode == BUZ_MODE_MOTION_DECOMPRESS ||
1471 zr->codec_mode == BUZ_MODE_MOTION_COMPRESS)) { 1471 zr->codec_mode == BUZ_MODE_MOTION_COMPRESS)) {
1472 if (zr36067_debug > 1 && (!zr->frame_num || zr->JPEG_error)) { 1472 if (zr36067_debug > 1 && (!zr->frame_num || zr->JPEG_error)) {
1473 char sc[] = "0000"; 1473 char sv[BUZ_NUM_STAT_COM + 1];
1474 char sv[5];
1475 int i; 1474 int i;
1476 1475
1477 printk(KERN_INFO 1476 printk(KERN_INFO
@@ -1481,12 +1480,9 @@ zoran_irq (int irq,
1481 zr->jpg_settings.field_per_buff, 1480 zr->jpg_settings.field_per_buff,
1482 zr->JPEG_missed); 1481 zr->JPEG_missed);
1483 1482
1484 strcpy(sv, sc); 1483 for (i = 0; i < BUZ_NUM_STAT_COM; i++)
1485 for (i = 0; i < 4; i++) { 1484 sv[i] = le32_to_cpu(zr->stat_com[i]) & 1 ? '1' : '0';
1486 if (le32_to_cpu(zr->stat_com[i]) & 1) 1485 sv[BUZ_NUM_STAT_COM] = 0;
1487 sv[i] = '1';
1488 }
1489 sv[4] = 0;
1490 printk(KERN_INFO 1486 printk(KERN_INFO
1491 "%s: stat_com=%s queue_state=%ld/%ld/%ld/%ld\n", 1487 "%s: stat_com=%s queue_state=%ld/%ld/%ld/%ld\n",
1492 ZR_DEVNAME(zr), sv, 1488 ZR_DEVNAME(zr), sv,