From 5b16501f1c7803057b2e7480b1e22fe9ee9f2d19 Mon Sep 17 00:00:00 2001 From: ballen4705 <ballen4705@4ea69e1a-61f1-4043-bf83-b5c94c648137> Date: Sun, 5 Jan 2003 23:59:19 +0000 Subject: [PATCH] Philosophy -- all rows have the same number of columns. Print a placeholder like "-" if there is no entry. git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@434 4ea69e1a-61f1-4043-bf83-b5c94c648137 --- sm5/ataprint.c | 4 ++-- sm5/ataprint.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sm5/ataprint.c b/sm5/ataprint.c index 6003437e4..45da2c433 100644 --- a/sm5/ataprint.c +++ b/sm5/ataprint.c @@ -30,7 +30,7 @@ #include "smartctl.h" #include "extern.h" -const char *CVSid2="$Id: ataprint.c,v 1.50 2003/01/03 17:25:12 ballen4705 Exp $" +const char *CVSid2="$Id: ataprint.c,v 1.51 2003/01/05 23:59:19 ballen4705 Exp $" CVSID1 CVSID2 CVSID3 CVSID6; // for passing global control variables @@ -675,7 +675,7 @@ int ataPrintSmartSelfTestlog(struct ata_smart_selftestlog *data,int allentries){ // This is true in ALL ATA-5 specs if (!errorfound || log->lbafirstfailure==0xffffffff || log->lbafirstfailure==0x00000000) - sprintf(firstlba,"%s",""); + sprintf(firstlba,"%s","-"); else sprintf(firstlba,"0x%08x",log->lbafirstfailure); diff --git a/sm5/ataprint.cpp b/sm5/ataprint.cpp index 64ed2db14..7b9c416d3 100644 --- a/sm5/ataprint.cpp +++ b/sm5/ataprint.cpp @@ -30,7 +30,7 @@ #include "smartctl.h" #include "extern.h" -const char *CVSid2="$Id: ataprint.cpp,v 1.50 2003/01/03 17:25:12 ballen4705 Exp $" +const char *CVSid2="$Id: ataprint.cpp,v 1.51 2003/01/05 23:59:19 ballen4705 Exp $" CVSID1 CVSID2 CVSID3 CVSID6; // for passing global control variables @@ -675,7 +675,7 @@ int ataPrintSmartSelfTestlog(struct ata_smart_selftestlog *data,int allentries){ // This is true in ALL ATA-5 specs if (!errorfound || log->lbafirstfailure==0xffffffff || log->lbafirstfailure==0x00000000) - sprintf(firstlba,"%s",""); + sprintf(firstlba,"%s","-"); else sprintf(firstlba,"0x%08x",log->lbafirstfailure); -- GitLab