summaryrefslogtreecommitdiff
path: root/miscutils/hdparm.c
diff options
context:
space:
mode:
authorRob Landley2006-02-22 17:01:00 +0000
committerRob Landley2006-02-22 17:01:00 +0000
commit0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58 (patch)
treef32eb89325299a3abade721ffe149b0e516747c1 /miscutils/hdparm.c
parentfb16d5c6aa8aef30d313356b5a83ef0a60114c9a (diff)
downloadbusybox-0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58.zip
busybox-0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58.tar.gz
Patch from Denis Vlasenko to constify things and fix a few typos.
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++)