Skip to content

Commit

Permalink
Merge pull request #4157 from facebook/fix_result_c
Browse files Browse the repository at this point in the history
fix incorrect pointer manipulation
  • Loading branch information
Cyan4973 authored Oct 2, 2024
2 parents dcc8fd0 + de6cc98 commit 751bf1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/regression/result.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "result.h"

char const* result_get_error_string(result_t result) {
const char* result_get_error_string(result_t result) {
switch (result_get_error(result)) {
case result_error_ok:
return "okay";
Expand All @@ -25,6 +25,6 @@ char const* result_get_error_string(result_t result) {
case result_error_round_trip_error:
return "round trip error";
default:
return "unknown error - " + result_get_error(result);
return "unknown error";
}
}
2 changes: 1 addition & 1 deletion tests/regression/result.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static result_error_t result_get_error(result_t result) {
return result.internal_error;
}

char const* result_get_error_string(result_t result);
const char* result_get_error_string(result_t result);

static result_data_t result_get_data(result_t result) {
return result.internal_data;
Expand Down

0 comments on commit 751bf1f

Please sign in to comment.