summaryrefslogtreecommitdiff
path: root/miscutils/hdparm.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/hdparm.c')
-rw-r--r--miscutils/hdparm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 750cb49..e733c91 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -1305,10 +1305,12 @@ static const char * const BuffType[] = {"unknown", "1Sect", "DualPort", "DualPor
static void dump_identity (const struct hd_driveid *id)
{
int i;
- char pmodes[64] = {0,}, dmodes[128]={0,}, umodes[128]={0,};
+ char pmodes[64], dmodes[128], umodes[128];
const unsigned short int *id_regs= (const void*) id;
unsigned long capacity;
+ pmodes[0] = dmodes[0] = umodes[0] = '\0';
+
printf("\n Model=%.40s, FwRev=%.8s, SerialNo=%.20s\n Config={",
id->model, id->fw_rev, id->serial_no);
for (i=0; i<=15; i++)