summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-09-01 13:16:48 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-09-01 13:16:48 +0200
commit710fdac1e49276683abe927472fe1b336960edd8 (patch)
treec992e268355fa2365ce23987607b7f4d4bf2dcfa /udev
parent8cfcf9980a3a7037a12a3052c38e4981cb0f0190 (diff)
udev-rules.c: remove 'first_token' variable
Diffstat (limited to 'udev')
-rw-r--r--udev/udev-rules.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c
index 96645e8f02..4d9fa70ae5 100644
--- a/udev/udev-rules.c
+++ b/udev/udev-rules.c
@@ -1568,7 +1568,6 @@ invalid:
static int parse_file(struct udev_rules *rules, const char *filename, unsigned short filename_off)
{
FILE *f;
- unsigned int first_token;
char line[UTIL_LINE_SIZE];
int line_nr = 0;
unsigned int i;
@@ -1578,10 +1577,7 @@ static int parse_file(struct udev_rules *rules, const char *filename, unsigned s
f = fopen(filename, "r");
if (f == NULL)
return -1;
-
- first_token = rules->token_cur;
-
- while(fgets(line, sizeof(line), f) != NULL) {
+ while (fgets(line, sizeof(line), f) != NULL) {
char *key;
size_t len;
@@ -1616,7 +1612,7 @@ static int parse_file(struct udev_rules *rules, const char *filename, unsigned s
fclose(f);
/* link GOTOs to LABEL rules in this file to be able to fast-forward */
- for (i = first_token+1; i < rules->token_cur; i++) {
+ for (i = rules->token_cur+1; i < rules->token_cur; i++) {
if (rules->tokens[i].type == TK_A_GOTO) {
char *label = &rules->buf[rules->tokens[i].key.value_off];
unsigned int j;