diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-05-27 15:11:00 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2010-05-27 15:11:00 +0200 |
commit | 88cbfb09ee5510277503ff1830ecc3aa6c380b00 (patch) | |
tree | 5e836252fc5c2061066d2afe386db29b254d514d | |
parent | abbc1c17a0cd0c6f5d00f9d2cd3bf19901ccb6f8 (diff) |
while (1) -> for (;;)
-rw-r--r-- | libudev/libudev-queue.c | 4 | ||||
-rw-r--r-- | libudev/libudev-util-private.c | 2 | ||||
-rw-r--r-- | libudev/test-libudev.c | 4 | ||||
-rw-r--r-- | udev/udev-event.c | 2 | ||||
-rw-r--r-- | udev/udev-rules.c | 10 | ||||
-rw-r--r-- | udev/udevadm-control.c | 2 | ||||
-rw-r--r-- | udev/udevadm-info.c | 2 | ||||
-rw-r--r-- | udev/udevadm-monitor.c | 2 | ||||
-rw-r--r-- | udev/udevadm-settle.c | 4 | ||||
-rw-r--r-- | udev/udevadm-test.c | 2 | ||||
-rw-r--r-- | udev/udevadm-trigger.c | 2 | ||||
-rw-r--r-- | udev/udevadm.c | 2 | ||||
-rw-r--r-- | udev/udevd.c | 6 |
13 files changed, 22 insertions, 22 deletions
diff --git a/libudev/libudev-queue.c b/libudev/libudev-queue.c index d305db6578..be8804bdd0 100644 --- 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; - while (1) { + for (;;) { 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; - while (1) { + for (;;) { 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 8c535125a8..7d28b23b38 100644 --- 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; - while (1) { + for (;;) { *pos = '\0'; pos = strrchr(p, '/'); diff --git a/libudev/test-libudev.c b/libudev/test-libudev.c index 34b3de86f1..3eb34494df 100644 --- 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); - while (1) { + for (;;) { 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); - while (1) { + for (;;) { int option; option = getopt_long(argc, argv, "+dhV", options, NULL); diff --git a/udev/udev-event.c b/udev/udev-event.c index 9c2ce1d388..44e24313f5 100644 --- 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; - while (1) { + for (;;) { 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 00b88d968c..11948cacce 100644 --- 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; - while (1) { + for (;;) { 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; - while (1) { + for (;;) { 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; } - while (1) { + for (;;) { 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); - while (1) { + for (;;) { 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; - while (1) { + for (;;) { 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 0fd69b9a0a..4303aeb5a8 100644 --- 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; - while (1) { + for (;;) { int option; int i; char *endp; diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c index b395ad93b6..14baa6accb 100644 --- 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; - while (1) { + for (;;) { int option; struct stat statbuf; diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c index fb650846bc..85252bb7d9 100644 --- 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); - while (1) { + for (;;) { 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 4f422f9092..1423cec6dc 100644 --- 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); - while (1) { + for (;;) { 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 }; diff --git a/udev/udevadm-test.c b/udev/udevadm-test.c index 894620073a..4db70c49dd 100644 --- 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); - while (1) { + for (;;) { 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 3cb07dda9a..481e9cf163 100644 --- 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; } - while (1) { + for (;;) { int option; const char *key; const char *val; diff --git a/udev/udevadm.c b/udev/udevadm.c index 21b7f616c3..19b89ad05c 100644 --- 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); - while (1) { + for (;;) { int option; option = getopt_long(argc, argv, "+dhV", options, NULL); diff --git a/udev/udevd.c b/udev/udevd.c index 802153b295..b48a91391d 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -536,7 +536,7 @@ static void events_start(struct udev *udev) static void worker_returned(void) { - while (1) { + for (;;) { 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: - while (1) { + for (;;) { 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); - while (1) { + for (;;) { int option; option = getopt_long(argc, argv, "dDthV", options, NULL); |