chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
abbc1c1
)
while (1) -> for (;;)
author
Kay Sievers
<kay.sievers@vrfy.org>
Thu, 27 May 2010 13:11:00 +0000
(15:11 +0200)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Thu, 27 May 2010 13:11:00 +0000
(15:11 +0200)
13 files changed:
libudev/libudev-queue.c
patch
|
blob
|
history
libudev/libudev-util-private.c
patch
|
blob
|
history
libudev/test-libudev.c
patch
|
blob
|
history
udev/udev-event.c
patch
|
blob
|
history
udev/udev-rules.c
patch
|
blob
|
history
udev/udevadm-control.c
patch
|
blob
|
history
udev/udevadm-info.c
patch
|
blob
|
history
udev/udevadm-monitor.c
patch
|
blob
|
history
udev/udevadm-settle.c
patch
|
blob
|
history
udev/udevadm-test.c
patch
|
blob
|
history
udev/udevadm-trigger.c
patch
|
blob
|
history
udev/udevadm.c
patch
|
blob
|
history
udev/udevd.c
patch
|
blob
|
history
diff --git
a/libudev/libudev-queue.c
b/libudev/libudev-queue.c
index d305db6578e8ece4468693ce5f22492121e462b8..be8804bdd004851fb3ed8d77bbffca64a03447be 100644
(file)
--- a/
libudev/libudev-queue.c
+++ b/
libudev/libudev-queue.c
@@
-243,7
+243,7
@@
unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue)
if (queue_file == NULL)
return 0;
if (queue_file == NULL)
return 0;
-
while (1
) {
+
for (;;
) {
unsigned long long int seqnum;
ssize_t devpath_len;
unsigned long long int seqnum;
ssize_t devpath_len;
@@
-435,7
+435,7
@@
struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev
if (queue_file == NULL)
return NULL;
if (queue_file == NULL)
return NULL;
-
while (1
) {
+
for (;;
) {
char syspath[UTIL_PATH_SIZE];
char *s;
size_t l;
char syspath[UTIL_PATH_SIZE];
char *s;
size_t l;
diff --git
a/libudev/libudev-util-private.c
b/libudev/libudev-util-private.c
index 8c535125a83c0fee9e818357912d8b1215ac1ecb..7d28b23b389e6d3c6fc11dba6d75678a5760ba79 100644
(file)
--- a/
libudev/libudev-util-private.c
+++ b/
libudev/libudev-util-private.c
@@
-84,7
+84,7
@@
int util_delete_path(struct udev *udev, const char *path)
if (pos == p || pos == NULL)
return 0;
if (pos == p || pos == NULL)
return 0;
-
while (1
) {
+
for (;;
) {
*pos = '\0';
pos = strrchr(p, '/');
*pos = '\0';
pos = strrchr(p, '/');
diff --git
a/libudev/test-libudev.c
b/libudev/test-libudev.c
index 34b3de86f1be8fe4d01abefa149a7823d5377ef3..3eb34494df8a8bcf2d1d57a687e0b9079fed3e93 100644
(file)
--- a/
libudev/test-libudev.c
+++ b/
libudev/test-libudev.c
@@
-242,7
+242,7
@@
static int test_monitor(struct udev *udev)
fd = udev_monitor_get_fd(udev_monitor);
FD_ZERO(&readfds);
fd = udev_monitor_get_fd(udev_monitor);
FD_ZERO(&readfds);
-
while (1
) {
+
for (;;
) {
struct udev_device *device;
int fdcount;
struct udev_device *device;
int fdcount;
@@
-422,7
+422,7
@@
int main(int argc, char *argv[])
udev_set_log_fn(udev, log_fn);
printf("set log: %p\n", log_fn);
udev_set_log_fn(udev, log_fn);
printf("set log: %p\n", log_fn);
-
while (1
) {
+
for (;;
) {
int option;
option = getopt_long(argc, argv, "+dhV", options, NULL);
int option;
option = getopt_long(argc, argv, "+dhV", options, NULL);
diff --git
a/udev/udev-event.c
b/udev/udev-event.c
index 9c2ce1d3882aeb1398e7b011fd378c83578b7285..44e24313f5f90abbfd060255a9d78290818aa5c3 100644
(file)
--- a/
udev/udev-event.c
+++ b/
udev/udev-event.c
@@
-111,7
+111,7
@@
size_t udev_event_apply_format(struct udev_event *event, const char *src, char *
s = dest;
l = size;
s = dest;
l = size;
-
while (1
) {
+
for (;;
) {
enum subst_type type = SUBST_UNKNOWN;
char attrbuf[UTIL_PATH_SIZE];
char *attr = NULL;
enum subst_type type = SUBST_UNKNOWN;
char attrbuf[UTIL_PATH_SIZE];
char *attr = NULL;
diff --git
a/udev/udev-rules.c
b/udev/udev-rules.c
index 00b88d968c9e323fe4e26312599526d22c4ac248..11948caccea8b7d03204e90998394274346334bf 100644
(file)
--- a/
udev/udev-rules.c
+++ b/
udev/udev-rules.c
@@
-894,7
+894,7
@@
static int get_key(struct udev *udev, char **line, char **key, enum operation_ty
return -1;
*key = linepos;
return -1;
*key = linepos;
-
while (1
) {
+
for (;;
) {
linepos++;
if (linepos[0] == '\0')
return -1;
linepos++;
if (linepos[0] == '\0')
return -1;
@@
-1180,7
+1180,7
@@
static int add_rule(struct udev_rules *rules, char *line,
rule_tmp.rule.rule.filename_line = lineno;
linepos = line;
rule_tmp.rule.rule.filename_line = lineno;
linepos = line;
-
while (1
) {
+
for (;;
) {
char *key;
char *value;
enum operation_type op;
char *key;
char *value;
enum operation_type op;
@@
-1707,7
+1707,7
@@
static int add_matching_files(struct udev *udev, struct udev_list_node *file_lis
return -1;
}
return -1;
}
-
while (1
) {
+
for (;;
) {
struct dirent *dent;
dent = readdir(dir);
struct dirent *dent;
dent = readdir(dir);
@@
-1940,7
+1940,7
@@
static int match_key(struct udev_rules *rules, struct token *token, const char *
split = &rules->buf[token->key.value_off];
len = strlen(val);
split = &rules->buf[token->key.value_off];
len = strlen(val);
-
while (1
) {
+
for (;;
) {
const char *next;
next = strchr(split, '|');
const char *next;
next = strchr(split, '|');
@@
-2182,7
+2182,7
@@
int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
/* loop over parents */
event->dev_parent = event->dev;
/* loop over parents */
event->dev_parent = event->dev;
-
while (1
) {
+
for (;;
) {
struct token *key;
dbg(event->udev, "parent: '%s'\n", udev_device_get_syspath(event->dev_parent));
struct token *key;
dbg(event->udev, "parent: '%s'\n", udev_device_get_syspath(event->dev_parent));
diff --git
a/udev/udevadm-control.c
b/udev/udevadm-control.c
index 0fd69b9a0aafdcebfc930c2b817577714dfd874e..4303aeb5a8b1770e200b5997107616bf8e20fb1f 100644
(file)
--- a/
udev/udevadm-control.c
+++ b/
udev/udevadm-control.c
@@
-66,7
+66,7
@@
int udevadm_control(struct udev *udev, int argc, char *argv[])
if (uctrl == NULL)
return 2;
if (uctrl == NULL)
return 2;
-
while (1
) {
+
for (;;
) {
int option;
int i;
char *endp;
int option;
int i;
char *endp;
diff --git
a/udev/udevadm-info.c
b/udev/udevadm-info.c
index b395ad93b65c581405b8fbc56b2f83cef41a192a..14baa6accb79c979e984f267623d649a6bec6806 100644
(file)
--- a/
udev/udevadm-info.c
+++ b/
udev/udevadm-info.c
@@
-238,7
+238,7
@@
int udevadm_info(struct udev *udev, int argc, char *argv[])
QUERY_ALL,
} query = QUERY_NONE;
QUERY_ALL,
} query = QUERY_NONE;
-
while (1
) {
+
for (;;
) {
int option;
struct stat statbuf;
int option;
struct stat statbuf;
diff --git
a/udev/udevadm-monitor.c
b/udev/udevadm-monitor.c
index fb650846bcd4eca2628cdbe7c13d9fbc588aed3c..85252bb7d98e1bd61f10b4e6809d47053688d127 100644
(file)
--- a/
udev/udevadm-monitor.c
+++ b/
udev/udevadm-monitor.c
@@
-92,7
+92,7
@@
int udevadm_monitor(struct udev *udev, int argc, char *argv[])
udev_list_init(&subsystem_match_list);
udev_list_init(&tag_match_list);
udev_list_init(&subsystem_match_list);
udev_list_init(&tag_match_list);
-
while (1
) {
+
for (;;
) {
option = getopt_long(argc, argv, "pekus:t:h", options, NULL);
if (option == -1)
break;
option = getopt_long(argc, argv, "pekus:t:h", options, NULL);
if (option == -1)
break;
diff --git
a/udev/udevadm-settle.c
b/udev/udevadm-settle.c
index 4f422f90927d410b3287721245fed26444435840..1423cec6dc72c44108fb328f8d3878ae81797b20 100644
(file)
--- a/
udev/udevadm-settle.c
+++ b/
udev/udevadm-settle.c
@@
-84,7
+84,7
@@
int udevadm_settle(struct udev *udev, int argc, char *argv[])
sigaddset(&mask, SIGALRM);
sigprocmask(SIG_UNBLOCK, &mask, NULL);
sigaddset(&mask, SIGALRM);
sigprocmask(SIG_UNBLOCK, &mask, NULL);
-
while (1
) {
+
for (;;
) {
int option;
int seconds;
int option;
int seconds;
@@
-181,7
+181,7
@@
int udevadm_settle(struct udev *udev, int argc, char *argv[])
}
}
}
}
-
while (1
) {
+
for (;;
) {
struct stat statbuf;
const struct timespec duration = { 0 , 1000 * 1000 * 1000 / LOOP_PER_SECOND };
struct stat statbuf;
const struct timespec duration = { 0 , 1000 * 1000 * 1000 / LOOP_PER_SECOND };
diff --git
a/udev/udevadm-test.c
b/udev/udevadm-test.c
index 894620073abe41011093f175ae52ceec42223ebd..4db70c49ddb68f44c245facaf6d53eb9d1285076 100644
(file)
--- a/
udev/udevadm-test.c
+++ b/
udev/udevadm-test.c
@@
-50,7
+50,7
@@
int udevadm_test(struct udev *udev, int argc, char *argv[])
info(udev, "version %s\n", VERSION);
info(udev, "version %s\n", VERSION);
-
while (1
) {
+
for (;;
) {
int option;
option = getopt_long(argc, argv, "a:s:fh", options, NULL);
int option;
option = getopt_long(argc, argv, "a:s:fh", options, NULL);
diff --git
a/udev/udevadm-trigger.c
b/udev/udevadm-trigger.c
index 3cb07dda9abc7c987ab89fb98d25815385913339..481e9cf163c92a8e052a7dbf127138440f6cd0ff 100644
(file)
--- a/
udev/udevadm-trigger.c
+++ b/
udev/udevadm-trigger.c
@@
-122,7
+122,7
@@
int udevadm_trigger(struct udev *udev, int argc, char *argv[])
goto exit;
}
goto exit;
}
-
while (1
) {
+
for (;;
) {
int option;
const char *key;
const char *val;
int option;
const char *key;
const char *val;
diff --git
a/udev/udevadm.c
b/udev/udevadm.c
index 21b7f616c3e11c04995841ead06e0d3a59efad29..19b89ad05cbfb9cbf5ac38cbf8cff5d6e9b836f9 100644
(file)
--- a/
udev/udevadm.c
+++ b/
udev/udevadm.c
@@
-146,7
+146,7
@@
int main(int argc, char *argv[])
udev_set_log_fn(udev, log_fn);
udev_selinux_init(udev);
udev_set_log_fn(udev, log_fn);
udev_selinux_init(udev);
-
while (1
) {
+
for (;;
) {
int option;
option = getopt_long(argc, argv, "+dhV", options, NULL);
int option;
option = getopt_long(argc, argv, "+dhV", options, NULL);
diff --git
a/udev/udevd.c
b/udev/udevd.c
index 802153b295c229fcd0153f2e37d4129f7f185fdd..b48a91391de87b7c6a2eaed5c9593a1dcf0eb3fc 100644
(file)
--- a/
udev/udevd.c
+++ b/
udev/udevd.c
@@
-536,7
+536,7
@@
static void events_start(struct udev *udev)
static void worker_returned(void)
{
static void worker_returned(void)
{
-
while (1
) {
+
for (;;
) {
struct worker_message msg;
ssize_t size;
struct udev_list_node *loop;
struct worker_message msg;
ssize_t size;
struct udev_list_node *loop;
@@
-709,7
+709,7
@@
static void handle_signal(struct udev *udev, int signo)
udev_exit = true;
break;
case SIGCHLD:
udev_exit = true;
break;
case SIGCHLD:
-
while (1
) {
+
for (;;
) {
pid_t pid;
int status;
struct udev_list_node *loop, *tmp;
pid_t pid;
int status;
struct udev_list_node *loop, *tmp;
@@
-975,7
+975,7
@@
int main(int argc, char *argv[])
info(udev, "version %s\n", VERSION);
udev_selinux_init(udev);
info(udev, "version %s\n", VERSION);
udev_selinux_init(udev);
-
while (1
) {
+
for (;;
) {
int option;
option = getopt_long(argc, argv, "dDthV", options, NULL);
int option;
option = getopt_long(argc, argv, "dDthV", options, NULL);