-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use NODEV macro instead of explicit (dev_t)-1.
Also fix an assignment of dev_t to -1 that should be NODEV. Bug #1074.
- Loading branch information
Showing
7 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* SPDX-License-Identifier: ISC | ||
* | ||
* Copyright (c) 1996, 1998-2005, 2008, 2009-2023 | ||
* Copyright (c) 1996, 1998-2005, 2008, 2009-2024 | ||
* Todd C. Miller <[email protected]> | ||
* | ||
* Permission to use, copy, modify, and distribute this software for any | ||
|
@@ -40,6 +40,10 @@ | |
* Macros and functions that may be missing on some operating systems. | ||
*/ | ||
|
||
#ifndef NODEV | ||
# define NODEV ((dev_t)-1) /* non-existent device */ | ||
#endif | ||
|
||
/* | ||
* Given the pointer x to the member m of the struct s, return | ||
* a pointer to the containing structure. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* SPDX-License-Identifier: ISC | ||
* | ||
* Copyright (c) 2012-2018 Todd C. Miller <[email protected]> | ||
* Copyright (c) 2012-2018, 2024 Todd C. Miller <[email protected]> | ||
* | ||
* Permission to use, copy, modify, and distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* SPDX-License-Identifier: ISC | ||
* | ||
* Copyright (c) 2014-2023 Todd C. Miller <[email protected]> | ||
* Copyright (c) 2014-2024 Todd C. Miller <[email protected]> | ||
* | ||
* Permission to use, copy, modify, and distribute this software for any | ||
* purpose with or without fee is hereby granted, provided that the above | ||
|
@@ -397,7 +397,7 @@ ts_init_key(const struct sudoers_context *ctx, | |
sudo_warnx("unknown time stamp ticket type %d", ticket_type); | ||
FALLTHROUGH; | ||
case tty: | ||
if (ctx->user.ttydev != (dev_t)-1) { | ||
if (ctx->user.ttydev != NODEV) { | ||
/* tty-based time stamp */ | ||
entry->type = TS_TTY; | ||
entry->u.ttydev = ctx->user.ttydev; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters