Krolyxon
Commit b096cbd

Branches

Refs →

nsxivb096cbd

Removed unnecessary buffer size constants

Author
Bert Münnich
Date
2015-10-28 22:23 +0100
Parent
9a7e97c
Commit
b096cbd536b94ee848b94d873d0c0a898f574af1

+3 −14

2 files changed

  1. M main.c +2 −7
  2. M util.c +1 −7
M main.c View
@@ -42,11 +42,6 @@
4242 #define _MAPPINGS_CONFIG
4343 #include "config.h"
4444
45−enum {
46− FILENAME_CNT = 1024,
47− TITLE_LEN = 256
48−};
49−
5045 typedef struct {
5146 const char *name;
5247 char *cmd;
@@ -348,7 +343,7 @@ void bar_put(win_bar_t *bar, const char *fmt, ...)
348343 void update_info(void)
349344 {
350345 unsigned int i, fn, fw;
351− char title[TITLE_LEN];
346+ char title[256];
352347 const char * mark;
353348 bool ow_info;
354349 win_bar_t *l = &win.bar.l, *r = &win.bar.r;
@@ -801,7 +796,7 @@ int main(int argc, char **argv)
801796 }
802797
803798 if (options->recursive || options->from_stdin)
804− filecnt = FILENAME_CNT;
799+ filecnt = 1024;
805800 else
806801 filecnt = options->filecnt;
807802
M util.c View
@@ -26,12 +26,6 @@
2626 #include "options.h"
2727 #include "util.h"
2828
29−enum {
30− BUF_SIZE = 1024,
31− DNAME_CNT = 512,
32− FNAME_LEN = 1024
33−};
34−
3529 void cleanup(void);
3630
3731 void* s_malloc(size_t size)
@@ -117,7 +111,7 @@ int r_opendir(r_dir_t *rdir, const char *dirname)
117111 return -1;
118112 }
119113
120− rdir->stcap = DNAME_CNT;
114+ rdir->stcap = 512;
121115 rdir->stack = (char**) s_malloc(rdir->stcap * sizeof(char*));
122116 rdir->stlen = 0;
123117