Reformat the source code
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
908fec06e4
commit
60d4da100e
1 changed files with 12 additions and 9 deletions
|
@ -11,7 +11,7 @@
|
|||
static void GetLogonHoursIndices(_In_ const SYSTEMTIME* time, _In_ const TIME_ZONE_INFORMATION* tzi, _Out_ LONG* plIndexSA, _Out_ LONG* plIndexBit)
|
||||
{
|
||||
LONG wIndex = (((LONG)time->wDayOfWeek * 24 + time->wHour) * 60 + time->wMinute + tzi->Bias) / 60 % (21 * 8);
|
||||
*plIndexSA = wIndex / 8,
|
||||
*plIndexSA = wIndex / 8;
|
||||
*plIndexBit = wIndex % 8;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,8 @@ static LPTSTR FormatMsg(_In_z_ LPCTSTR lpFormat, ...)
|
|||
&arg)) {
|
||||
va_end(arg);
|
||||
return lpBuffer;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
va_end(arg);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -96,7 +97,8 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine
|
|||
if (V_VT(&varLogonHours) == VT_EMPTY) {
|
||||
uiResult = 0; // User has no logon hours defined
|
||||
goto _cleanup5;
|
||||
} else if (V_VT(&varLogonHours) != (VT_ARRAY | VT_UI1)) {
|
||||
}
|
||||
else if (V_VT(&varLogonHours) != (VT_ARRAY | VT_UI1)) {
|
||||
uiResult = 7; // Invalid logon hours
|
||||
goto _cleanup5;
|
||||
}
|
||||
|
@ -117,7 +119,8 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine
|
|||
}
|
||||
if (bData & (1 << lIndexBit)) {
|
||||
uiResult = 0; // Within logon hours
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
uiResult = 1; // Out of logon hours
|
||||
LockWorkStation();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue