Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MojitOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
MojitOS
Commits
04364bb7
Commit
04364bb7
authored
1 month ago
by
Georges Da Costa
Browse files
Options
Downloads
Patches
Plain Diff
Corrects CI
parent
68f708ab
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!12
Libmoj
Pipeline
#11550
passed
1 month ago
Stage: build-option
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
lib/info_reader.c
+3
-3
3 additions, 3 deletions
lib/info_reader.c
lib/info_reader.h
+2
-2
2 additions, 2 deletions
lib/info_reader.h
with
6 additions
and
6 deletions
.gitlab-ci.yml
+
1
−
1
View file @
04364bb7
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
lib/info_reader.c
+
3
−
3
View file @
04364bb7
...
@@ -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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/info_reader.h
+
2
−
2
View file @
04364bb7
...
@@ -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,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment