Updating search
This commit is contained in:
parent
6e3696f4b1
commit
77dca6bed7
1 changed files with 1 additions and 1 deletions
2
lab8/2.c
2
lab8/2.c
|
@ -123,7 +123,7 @@ void search_entry(FILE * file, long imei) {
|
|||
short found = 0;
|
||||
for( int i = 0; fread(&entry, sizeof(Database), 1, file); i++ ) {
|
||||
if ( entry.imei == imei ) {
|
||||
if (!found) display_header();
|
||||
if (!found) display_header(); // Display header only once.
|
||||
display_entry(&entry, i);
|
||||
found = 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue