Skip to content

Commit

Permalink
Fix C++ type error with ___write_console_fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
feeley committed Apr 17, 2015
1 parent d84886e commit d9295c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/stamp.h
Expand Up @@ -3,4 +3,4 @@
*/

#define ___STAMP_YMD 20150417
#define ___STAMP_HMS 182424
#define ___STAMP_HMS 185128
8 changes: 5 additions & 3 deletions lib/os_base.c
Expand Up @@ -742,23 +742,25 @@ char **msgs;)


___SIZE_T ___write_console_fallback
___P((char *buf,
___P((void *buf,
___SIZE_T size),
(buf,
size)
char *buf;
void *buf;
___SIZE_T size;)
{
#ifdef USE_syslog

static char line_buf[128];
static int line_len = 0;
int i = 0;
char *b = ___CAST(char*,buf);

while (i < size)
{
char c;
if (line_len == sizeof(line_buf)-1 ||
(c = buf[i++]) == '\n')
(c = b[i++]) == '\n')
{
line_buf[line_len] = '\0';
syslog (LOG_ERR, "%s", line_buf);
Expand Down
2 changes: 1 addition & 1 deletion lib/os_base.h
Expand Up @@ -222,7 +222,7 @@ extern void ___display_error
*/

extern ___SIZE_T ___write_console_fallback
___P((char *buf,
___P((void *buf,
___SIZE_T size),
());

Expand Down

0 comments on commit d9295c2

Please sign in to comment.