Fix incorrect display of serial number in log if not existent

This commit is contained in:
Andy Beverley
2013-09-07 00:20:52 +01:00
parent 7ac6de9933
commit 3309ffdf8a

View File

@@ -288,7 +288,7 @@ int main( int argc, char** argv )
*/
/* Print serial number of device if it exists. */
if ( c2[i]->identity.serial_no ) {
if ( strlen(c2[i]->identity.serial_no) ) {
nwipe_log( NWIPE_LOG_INFO, "Device %s has serial number %s", c2[i]->device_name, c2[i]->identity.serial_no);
}