Skip to content

Commit

Permalink
Fix irritating formatting bug with scheduled shutdown time reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
Subsentient committed Dec 29, 2014
1 parent 8356072 commit 3b38d90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
11 changes: 2 additions & 9 deletions src/main.c
Expand Up @@ -1101,16 +1101,9 @@ static ReturnCode HandleEpochCommand(int argc, char **argv)
char TOut[MAX_LINE_SIZE];


if (argc != 3)
if (argc < 3)
{
if (argc > 3)
{
puts("Too many arguments.\n");
}
else
{
puts("Too few arguments.\n");
}
puts("Too few arguments.\n");

PrintEpochHelp(argv[0], "start");
return FAILURE;
Expand Down
10 changes: 7 additions & 3 deletions src/membus.c
Expand Up @@ -781,9 +781,9 @@ void ParseMemBus(void)
{
char MsgBuf[MAX_LINE_SIZE];
const char *HType = NULL;
const Bool H = HaltParams.TargetHour >= 10;
const Bool M = HaltParams.TargetMin >= 10;
const Bool S = HaltParams.TargetSec >= 10;
Bool H;
Bool M;
Bool S;

if (HaltParams.HaltMode != -1)
{/*Don't let us schedule two shutdowns.*/
Expand All @@ -805,6 +805,10 @@ void ParseMemBus(void)
return;
}

H = HaltParams.TargetHour >= 10;
M = HaltParams.TargetMin >= 10;
S = HaltParams.TargetSec >= 10;

++HaltParams.JobID;
HaltParams.HaltMode = Signal;

Expand Down

0 comments on commit 3b38d90

Please sign in to comment.