mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #374 from leeroy2098/master
Don't ignore the result of fwrite. Since we're building with -Wall and -...
This commit is contained in:
commit
6864e9c931
|
@ -138,7 +138,8 @@ int main(int argc, char *argv[])
|
||||||
if ( file==NULL ){return 1;}
|
if ( file==NULL ){return 1;}
|
||||||
uint8_t * buffer = malloc(Messenger_size());
|
uint8_t * buffer = malloc(Messenger_size());
|
||||||
Messenger_save(buffer);
|
Messenger_save(buffer);
|
||||||
fwrite(buffer, 1, Messenger_size(), file);
|
size_t write_result = fwrite(buffer, 1, Messenger_size(), file);
|
||||||
|
if (write_result < Messenger_size()) {return 1;}
|
||||||
free(buffer);
|
free(buffer);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user