diff options
-rw-r--r-- | src/conda.c | 2 | ||||
-rw-r--r-- | src/deliverable.c | 4 | ||||
-rw-r--r-- | src/environment.c | 4 | ||||
-rw-r--r-- | src/ini.c | 8 | ||||
-rw-r--r-- | src/relocation.c | 4 | ||||
-rw-r--r-- | src/utils.c | 8 |
6 files changed, 15 insertions, 15 deletions
diff --git a/src/conda.c b/src/conda.c index f18d2d1..79e4949 100644 --- a/src/conda.c +++ b/src/conda.c @@ -113,7 +113,7 @@ int conda_activate(const char *root, const char *env_name) { } int i = 0; while (!feof(fp)) { - char buf[BUFSIZ] = {0}; + char buf[OMC_BUFSIZ] = {0}; int ch = 0; int z = 0; while (z < sizeof(buf) && (ch = (int) fgetc(fp)) != 0) { diff --git a/src/deliverable.c b/src/deliverable.c index 8a267c1..f8e5145 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -122,7 +122,7 @@ int delivery_init(struct Delivery *ctx, struct INIFILE *ini, struct INIFILE *cfg // keys in the configuration rt = runtime_copy(__environ); while ((rtdata = ini_getall(ini, "runtime")) != NULL) { - char rec[BUFSIZ]; + char rec[OMC_BUFSIZ]; sprintf(rec, "%s=%s", lstrip(strip(rtdata->key)), lstrip(strip(rtdata->value))); runtime_set(rt, rtdata->key, rtdata->value); } @@ -422,7 +422,7 @@ static char *requirement_from_test(struct Delivery *ctx, const char *name) { void delivery_install_packages(struct Delivery *ctx, char *conda_install_dir, char *env_name, int type, struct StrList **manifest) { char cmd[PATH_MAX]; - char pkgs[BUFSIZ]; + char pkgs[OMC_BUFSIZ]; char *env_current = getenv("CONDA_DEFAULT_ENV"); if (env_current) { diff --git a/src/environment.c b/src/environment.c index 3718c47..d2134c4 100644 --- a/src/environment.c +++ b/src/environment.c @@ -70,7 +70,7 @@ void runtime_export(RuntimeEnv *env, char **keys) { NULL, }; - char output[BUFSIZ]; + char output[OMC_BUFSIZ]; char export_command[7]; // export=6 and setenv=6... convenient char *_sh = getenv("SHELL"); char *sh = path_basename(_sh); @@ -289,7 +289,7 @@ char *runtime_expand_var(RuntimeEnv *env, char *input) { return strdup(input); } - expanded = calloc(BUFSIZ, sizeof(char)); + expanded = calloc(OMC_BUFSIZ, sizeof(char)); if (expanded == NULL) { perror("could not allocate runtime_expand_var buffer"); fprintf(SYSERROR); @@ -69,7 +69,7 @@ struct INIData *ini_getall(struct INIFILE *ini, char *section_name) { int ini_getval(struct INIFILE *ini, char *section_name, char *key, int type, union INIVal *result) { char *token = NULL; - char tbuf[BUFSIZ]; + char tbuf[OMC_BUFSIZ]; char *tbufp = tbuf; struct INIData *data; data = ini_data_get(ini, section_name, key); @@ -234,8 +234,8 @@ void ini_free(struct INIFILE **ini) { struct INIFILE *ini_open(const char *filename) { FILE *fp; - char line[BUFSIZ] = {0}; - char current_section[BUFSIZ] = {0}; + char line[OMC_BUFSIZ] = {0}; + char current_section[OMC_BUFSIZ] = {0}; char *key_last = NULL; struct INIFILE *ini = ini_init(); @@ -296,7 +296,7 @@ struct INIFILE *ini_open(const char *filename) { } char *key = NULL; - char *value = malloc(BUFSIZ); + char *value = malloc(OMC_BUFSIZ); char *operator = strchr(line, '='); // continuation line diff --git a/src/relocation.c b/src/relocation.c index a81a45e..b92af2b 100644 --- a/src/relocation.c +++ b/src/relocation.c @@ -20,7 +20,7 @@ * @param replacement string value */ void replace_text(char *original, const char *target, const char *replacement) { - char buffer[OHMYCAL_BUFSIZ]; + char buffer[OMC_BUFSIZ]; char *tmp = original; memset(buffer, 0, sizeof(buffer)); @@ -62,7 +62,7 @@ void file_replace_text(const char* filename, const char* target, const char* rep return; } - char buffer[OHMYCAL_BUFSIZ]; + char buffer[OMC_BUFSIZ]; char tempfilename[] = "tempfileXXXXXX"; FILE *tfp = fopen(tempfilename, "w"); diff --git a/src/utils.c b/src/utils.c index 64166fe..5fe03d7 100644 --- a/src/utils.c +++ b/src/utils.c @@ -192,7 +192,7 @@ char **file_readlines(const char *filename, size_t start, size_t limit, ReaderFn } // Allocate buffer - if ((buffer = calloc(BUFSIZ, sizeof(char))) == NULL) { + if ((buffer = calloc(OMC_BUFSIZ, sizeof(char))) == NULL) { perror("line buffer"); fprintf(SYSERROR); if (!use_stdin) { @@ -202,7 +202,7 @@ char **file_readlines(const char *filename, size_t start, size_t limit, ReaderFn } // count number the of lines in the file - while ((fgets(buffer, BUFSIZ - 1, fp)) != NULL) { + while ((fgets(buffer, OMC_BUFSIZ - 1, fp)) != NULL) { lines++; } @@ -239,7 +239,7 @@ char **file_readlines(const char *filename, size_t start, size_t limit, ReaderFn continue; } - if (fgets(buffer, BUFSIZ - 1, fp) == NULL) { + if (fgets(buffer, OMC_BUFSIZ - 1, fp) == NULL) { break; } @@ -256,7 +256,7 @@ char **file_readlines(const char *filename, size_t start, size_t limit, ReaderFn } } result[i] = strdup(buffer); - memset(buffer, '\0', BUFSIZ); + memset(buffer, '\0', OMC_BUFSIZ); } free(buffer); |