summaryrefslogtreecommitdiffstats
path: root/src/lib.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2022-05-20 13:15:14 +0300
committergramanas <anastasis.gramm2@gmail.com>2022-05-20 13:15:14 +0300
commitb30cd3e1b8d1162c529bfdd602d0d56ccd2e38c7 (patch)
treebfae4137f78a0bf223518f6590db2bd436e82185 /src/lib.c
parent3515199c9e158d4b6fe5d064539bdf288dca7b81 (diff)
downloadfoodtools-b30cd3e1b8d1162c529bfdd602d0d56ccd2e38c7.tar.gz
foodtools-b30cd3e1b8d1162c529bfdd602d0d56ccd2e38c7.tar.bz2
foodtools-b30cd3e1b8d1162c529bfdd602d0d56ccd2e38c7.zip
aha
Diffstat (limited to 'src/lib.c')
-rw-r--r--src/lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib.c b/src/lib.c
index 3da93ed..a1f1f29 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -1,6 +1,8 @@
#include "lib.h"
#include "util.h"
+#define LINE_SIZE 4096
+
const char * default_food_lib = "/usr/local/share/food";
const char *
@@ -17,10 +19,10 @@ static int
rcp_find(char *** lib, int lib_n, const char * path)
{
int n = lib_n;
- char line[1035];
+ char line[LINE_SIZE];
FILE *fp;
- char cmd[2048] = "/bin/find ";
+ char cmd[LINE_SIZE] = "/bin/find ";
strcat(cmd, path);
strcat(cmd, " -name '*.rcp'");