fix redundant space and using ftell twice
This commit is contained in:
parent
7b58f36b39
commit
bf6923d24c
1 changed files with 3 additions and 3 deletions
6
ccc.c
6
ccc.c
|
@ -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));
|
||||||
|
@ -250,7 +250,7 @@ void init_windows()
|
||||||
WINDOW *panel = newwin(PH, COLS, LINES - PH, 0 );
|
WINDOW *panel = newwin(PH, COLS, LINES - PH, 0 );
|
||||||
|
|
||||||
/* draw border around windows */
|
/* draw border around windows */
|
||||||
draw_border_title(directory, true );
|
draw_border_title(directory, true);
|
||||||
draw_border_title(preview, false);
|
draw_border_title(preview, false);
|
||||||
|
|
||||||
/* window location y, x */
|
/* window location y, x */
|
||||||
|
|
Loading…
Reference in a new issue