Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
aremmell committed Jan 7, 2024
1 parent e921e8c commit 9a0b8e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions include/bal/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@ typedef unsigned bal_threadret;
# include <inttypes.h>
# include <assert.h>

# define BAL_MAXERROR 256
# define BAL_MAXERRORFMT 1024
# define BAL_MAXERROR 278
# define BAL_UNKNOWN "<unknown>"

# define BAL_AS_IPV6 "IPv6"
Expand Down
2 changes: 1 addition & 1 deletion include/bal/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ typedef struct {
/** The public error type. */
typedef struct {
int code;
char message[BAL_MAXERRORFMT];
char message[BAL_MAXERROR];
} bal_error;

/** The internal error type. */
Expand Down
4 changes: 2 additions & 2 deletions src/balerrors.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ int _bal_get_error(bal_error* err, bool extended)
}

if (extended) {
_bal_snprintf_trunc(err->message, BAL_MAXERRORFMT, BAL_ERRFMTEXT,
_bal_snprintf_trunc(err->message, BAL_MAXERROR, BAL_ERRFMTEXT,
_bal_tei.loc.func, _bal_tei.loc.file, _bal_tei.loc.line,
_bal_okptrnf(heap_msg) ? heap_msg : bal_errors[n].msg);
} else {
_bal_snprintf_trunc(err->message, BAL_MAXERRORFMT, BAL_ERRFMT,
_bal_snprintf_trunc(err->message, BAL_MAXERROR, BAL_ERRFMT,
_bal_okptrnf(heap_msg) ? heap_msg : bal_errors[n].msg);
}

Expand Down

0 comments on commit 9a0b8e2

Please sign in to comment.