Compiler suggested cleanups
This commit is contained in:
parent
e6e6262f45
commit
e3207c2009
6 changed files with 13 additions and 15 deletions
|
@ -1584,5 +1584,6 @@ static t_stat vh_help_attach (FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, ch
|
|||
{
|
||||
char *devtype = (UNIBUS) ? "DH11" : "DHQ11";
|
||||
|
||||
return tmxr_attach_help (st, dptr, uptr, flag, cptr);
|
||||
fprintf (st, "%s %s Terminal Multiplexer Attach Help\n\n", devtype, dptr->name);
|
||||
return tmxr_attach_help (st, dptr, uptr, 1, cptr);
|
||||
}
|
||||
|
|
|
@ -952,7 +952,6 @@ _console_poll(void *arg)
|
|||
{
|
||||
int sched_policy;
|
||||
struct sched_param sched_priority;
|
||||
int poll_timeout_count = 0;
|
||||
int wait_count = 0;
|
||||
DEVICE *d;
|
||||
|
||||
|
|
|
@ -1148,8 +1148,6 @@ return SCPE_OK;
|
|||
|
||||
t_stat sim_disk_attach_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, char *cptr)
|
||||
{
|
||||
size_t unit_number = (uptr-dptr->units);
|
||||
|
||||
fprintf (st, "%s Disk Attach Help\n\n", dptr->name);
|
||||
|
||||
fprintf (st, "Disk container files can be one of 3 different types:\n\n");
|
||||
|
|
17
sim_serial.c
17
sim_serial.c
|
@ -890,19 +890,18 @@ memset(list, 0, max*sizeof(*list));
|
|||
#if defined(__linux__)
|
||||
if (1) {
|
||||
struct dirent **namelist;
|
||||
int n;
|
||||
struct stat st;
|
||||
|
||||
n = scandir("/sys/class/tty/", &namelist, NULL, NULL);
|
||||
i = scandir("/sys/class/tty/", &namelist, NULL, NULL);
|
||||
|
||||
while (n--) {
|
||||
if (strcmp(namelist[n]->d_name, ".") &&
|
||||
strcmp(namelist[n]->d_name, "..")) {
|
||||
while (i--) {
|
||||
if (strcmp(namelist[i]->d_name, ".") &&
|
||||
strcmp(namelist[i]->d_name, "..")) {
|
||||
char path[1024], devicepath[1024], driverpath[1024];
|
||||
|
||||
sprintf (path, "/sys/class/tty/%s", namelist[n]->d_name);
|
||||
sprintf (devicepath, "/sys/class/tty/%s/device", namelist[n]->d_name);
|
||||
sprintf (driverpath, "/sys/class/tty/%s/device/driver", namelist[n]->d_name);
|
||||
sprintf (path, "/sys/class/tty/%s", namelist[i]->d_name);
|
||||
sprintf (devicepath, "/sys/class/tty/%s/device", namelist[i]->d_name);
|
||||
sprintf (driverpath, "/sys/class/tty/%s/device/driver", namelist[i]->d_name);
|
||||
if ((lstat(devicepath, &st) == 0) && S_ISLNK(st.st_mode)) {
|
||||
char buffer[1024];
|
||||
|
||||
|
@ -918,7 +917,7 @@ if (1) {
|
|||
}
|
||||
}
|
||||
}
|
||||
free (namelist[n]);
|
||||
free (namelist[i]);
|
||||
}
|
||||
free (namelist);
|
||||
}
|
||||
|
|
|
@ -1255,7 +1255,7 @@ pthread_mutex_lock (&sim_timer_lock);
|
|||
if (sim_asynch_enabled && sim_asynch_timer) {
|
||||
pthread_attr_t attr;
|
||||
UNIT *cptr;
|
||||
double delta_due_time;
|
||||
double delta_due_time = 0;
|
||||
|
||||
/* when restarting after being manually stopped the due times for all */
|
||||
/* timer events needs to slide so they fire in the future. (clock ticks */
|
||||
|
|
|
@ -2763,7 +2763,8 @@ t_bool single_line = FALSE; /* default to Multi-Line help */
|
|||
if (mux)
|
||||
single_line = (mux->lines == 1);
|
||||
|
||||
fprintf (st, "%s Multiplexer Attach Help\n\n", dptr->name);
|
||||
if (!flag)
|
||||
fprintf (st, "%s Multiplexer Attach Help\n\n", dptr->name);
|
||||
if (single_line) { /* Single Line Multiplexer */
|
||||
fprintf (st, "The %s multiplexer may be connected to terminal emulators supporting the\n", dptr->name);
|
||||
fprintf (st, "Telnet protocol via sockets, or to hardware terminals via host serial\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue