Skip to content
Snippets Groups Projects
Commit 04364bb7 authored by Georges Da Costa's avatar Georges Da Costa
Browse files

Corrects CI

parent 68f708ab
Branches
Tags
1 merge request!12Libmoj
Pipeline #11550 passed
...@@ -47,7 +47,7 @@ job-build: ...@@ -47,7 +47,7 @@ job-build:
job-build-prometeus: job-build-prometeus:
stage: build stage: build
script: script:
- apk add make gcc musl-dev linux-headers - apk add make gcc musl-dev linux-headers libmicrohttpd-dev
- ./configure.sh - ./configure.sh
- make mojitos_prometeus - make mojitos_prometeus
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
} }
#define PAGE_SIZE 4096 #define MAX_PAGE_SIZE 4096
ssize_t buffer_getline(char **lineptr, FILE *stream) { ssize_t buffer_getline(char **lineptr, FILE *stream) {
ssize_t num_chars_read = 0; ssize_t num_chars_read = 0;
static char buffer[PAGE_SIZE] = {0}; static char buffer[MAX_PAGE_SIZE] = {0};
if (!lineptr || !stream) { if (!lineptr || !stream) {
return -1; return -1;
...@@ -57,7 +57,7 @@ ssize_t buffer_getline(char **lineptr, FILE *stream) { ...@@ -57,7 +57,7 @@ ssize_t buffer_getline(char **lineptr, FILE *stream) {
} }
} }
if (num_chars_read == PAGE_SIZE - 1) { if (num_chars_read == MAX_PAGE_SIZE - 1) {
return -1; return -1;
} }
......
...@@ -121,11 +121,11 @@ unsigned int match(Parser *parser, char *line, KeyFinder **key_finder, ...@@ -121,11 +121,11 @@ unsigned int match(Parser *parser, char *line, KeyFinder **key_finder,
/** /**
* @brief Reads a line of text from a file stream and stores it in a static * @brief Reads a line of text from a file stream and stores it in a static
buffer with a maximum size of PAGE_SIZE. buffer with a maximum size of MAX_PAGE_SIZE.
* This function reads a line of text from the input stream pointed to by * This function reads a line of text from the input stream pointed to by
* 'stream'. The line of text is stored in a static buffer with a maximum size of * 'stream'. The line of text is stored in a static buffer with a maximum size of
* PAGE_SIZE. The function updates the pointer pointed to by 'lineptr' to point * MAX_PAGE_SIZE. The function updates the pointer pointed to by 'lineptr' to point
to to
* the buffer containing the line of text. If the line of text is longer than the * the buffer containing the line of text. If the line of text is longer than the
* buffer, the function returns -1. If an error occurs, * buffer, the function returns -1. If an error occurs,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment