Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions prom/src/prom_metric_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int prom_metric_sample_add(prom_metric_sample_t *self, double r_value) {
if (r_value < 0) {
return 1;
}
_Atomic double old = atomic_load(&self->r_value);
double old = atomic_load(&self->r_value);
for (;;) {
_Atomic double new = ATOMIC_VAR_INIT(old + r_value);
if (atomic_compare_exchange_weak(&self->r_value, &old, new)) {
Expand All @@ -78,7 +78,7 @@ int prom_metric_sample_sub(prom_metric_sample_t *self, double r_value) {
PROM_LOG(PROM_METRIC_INCORRECT_TYPE);
return 1;
}
_Atomic double old = atomic_load(&self->r_value);
double old = atomic_load(&self->r_value);
for (;;) {
_Atomic double new = ATOMIC_VAR_INIT(old - r_value);
if (atomic_compare_exchange_weak(&self->r_value, &old, new)) {
Expand Down
2 changes: 1 addition & 1 deletion promhttp/src/promhttp.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void promhttp_set_active_collector_registry(prom_collector_registry_t *active_re
}
}

int promhttp_handler(void *cls, struct MHD_Connection *connection, const char *url, const char *method,
enum MHD_Result promhttp_handler(void *cls, struct MHD_Connection *connection, const char *url, const char *method,
const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls) {
if (strcmp(method, "GET") != 0) {
char *buf = "Invalid HTTP Method\n";
Expand Down