Updating search

This commit is contained in:
Denis Nuțiu 2016-04-15 12:59:58 +03:00
parent 6e3696f4b1
commit 77dca6bed7

View file

@ -123,7 +123,7 @@ void search_entry(FILE * file, long imei) {
short found = 0; short found = 0;
for( int i = 0; fread(&entry, sizeof(Database), 1, file); i++ ) { for( int i = 0; fread(&entry, sizeof(Database), 1, file); i++ ) {
if ( entry.imei == imei ) { if ( entry.imei == imei ) {
if (!found) display_header(); if (!found) display_header(); // Display header only once.
display_entry(&entry, i); display_entry(&entry, i);
found = 1; found = 1;
} }