Skip to content
This repository was archived by the owner on Feb 4, 2024. It is now read-only.

Commit 5aa1412

Browse files
committed
fix: Ensure pinfo() is declared before uucp_lock() (#2)
Building with UUCP-style locking would fail because uucp_lock() calls pinfo(), but pinfo() was declared later in picocom.c.
1 parent 0d5c037 commit 5aa1412

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

picocom.c

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,24 @@ int tty_write_sz;
298298

299299
/**********************************************************************/
300300

301+
int
302+
pinfo(const char *format, ...)
303+
{
304+
va_list args;
305+
int len;
306+
307+
if ( opts.quiet ) {
308+
return 0;
309+
}
310+
va_start(args, format);
311+
len = fd_vprintf(STO, format, args);
312+
va_end(args);
313+
314+
return len;
315+
}
316+
317+
/**********************************************************************/
318+
301319
#ifdef UUCP_LOCK_DIR
302320

303321
/* use HDB UUCP locks .. see
@@ -640,22 +658,6 @@ read_hex (unsigned char *buff, int sz)
640658

641659
/**********************************************************************/
642660

643-
int
644-
pinfo(const char *format, ...)
645-
{
646-
va_list args;
647-
int len;
648-
649-
if ( opts.quiet ) {
650-
return 0;
651-
}
652-
va_start(args, format);
653-
len = fd_vprintf(STO, format, args);
654-
va_end(args);
655-
656-
return len;
657-
}
658-
659661
void
660662
cleanup (int drain, int noreset, int hup)
661663
{

0 commit comments

Comments
 (0)