mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dmfilemapd: cast return value of strto* functions when needed
This commit is contained in:
parent
834574cc27
commit
5e74e43896
@ -225,7 +225,7 @@ static int _is_open(const char *path)
|
||||
while ((proc_dp = readdir(proc_d)) != NULL) {
|
||||
if (!isdigit(proc_dp->d_name[0]))
|
||||
continue;
|
||||
pid = strtol(proc_dp->d_name, NULL, 10);
|
||||
pid = (pid_t) strtol(proc_dp->d_name, NULL, 10);
|
||||
if (!pid)
|
||||
continue;
|
||||
if (_is_open_in_pid(pid, path)) {
|
||||
@ -280,7 +280,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm)
|
||||
fm->nr_regions = 1;
|
||||
|
||||
/* parse <fd> */
|
||||
fm->fd = strtol(argv[0], &endptr, 10);
|
||||
fm->fd = (int) strtol(argv[0], &endptr, 10);
|
||||
if (*endptr) {
|
||||
_early_log("Could not parse file descriptor: %s", argv[0]);
|
||||
return 0;
|
||||
@ -334,7 +334,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm)
|
||||
|
||||
/* parse [<foreground>[<verbose>]] */
|
||||
if (argc) {
|
||||
_foreground = strtol(argv[0], &endptr, 10);
|
||||
_foreground = (int) strtol(argv[0], &endptr, 10);
|
||||
if (*endptr) {
|
||||
_early_log("Could not parse debug argument: %s.",
|
||||
argv[0]);
|
||||
@ -343,7 +343,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm)
|
||||
argc--;
|
||||
argv++;
|
||||
if (argc) {
|
||||
_verbose = strtol(argv[0], &endptr, 10);
|
||||
_verbose = (int) strtol(argv[0], &endptr, 10);
|
||||
if (*endptr) {
|
||||
_early_log("Could not parse verbose "
|
||||
"argument: %s", argv[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user