fix redundant space and using ftell twice

This commit is contained in:
Night Kaly 2024-03-10 21:31:33 +00:00
parent 7b58f36b39
commit bf6923d24c
No known key found for this signature in database
GPG key ID: 8E829D3381CFEBBE

2
ccc.c
View file

@ -217,8 +217,8 @@ void show_file_content()
fseek(file, 0, SEEK_END); fseek(file, 0, SEEK_END);
/* check if file isn't empty */ /* check if file isn't empty */
if (ftell(file) != 0) {
long length = ftell(file); long length = ftell(file);
if (length != 0) {
fseek(file, 0, SEEK_SET); fseek(file, 0, SEEK_SET);
char *buffer = memalloc(length * sizeof(char)); char *buffer = memalloc(length * sizeof(char));