1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

Named constants are always much better than magic numbers...

(I defined the constants when I put in 'net rpc shutdown')

Andrew Bartlett
(This used to be commit 4d90cc1d99)
This commit is contained in:
Andrew Bartlett 2002-01-01 00:18:47 +00:00
parent 38851c64d9
commit 6694109c04

View File

@ -202,9 +202,9 @@ NTSTATUS _reg_shutdown(pipes_struct *p, REG_Q_SHUTDOWN *q_u, REG_R_SHUTDOWN *r_u
/* timeout */
snprintf(timeout, sizeof(timeout), "%d", q_u->timeout);
/* reboot */
snprintf(r, sizeof(r), (q_u->flags & 0x100)?SHUTDOWN_R_STRING:"");
snprintf(r, sizeof(r), (q_u->flags & REG_REBOOT_ON_SHUTDOWN)?SHUTDOWN_R_STRING:"");
/* force */
snprintf(f, sizeof(f), (q_u->flags & 0x001)?SHUTDOWN_F_STRING:"");
snprintf(f, sizeof(f), (q_u->flags & REG_FORCE_SHUTDOWN)?SHUTDOWN_F_STRING:"");
pstrcpy(shutdown_script, lp_shutdown_script());