public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Andrey J. Melnikoff (TEMHOTA)" <temnota@kmv.ru>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	linux-kernel@vger.kernel.org
Cc: Olya Briginets <bolya@ukrpost.net>
Subject: [PATCH] 2.4.31: fix isofs mount options parser
Date: Thu, 11 Aug 2005 15:01:22 +0400	[thread overview]
Message-ID: <20050811110122.GX9857@kmv.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

Hello Marcelo, LKML.

Previos patch incomplete and fix only gcc warnings. New patch attached.

Description:
This patch pix gcc-3.4 warnings, andfix broken logic in mount options
parser.

--- cut ---
inode.c: In function `parse_options':
inode.c:341: warning: comparison of unsigned expression < 0 is always false
inode.c:347: warning: comparison of unsigned expression < 0 is always false
--- cut ---

Signed-of-by: Andrey Melnikoff <temnota@kmv.ru>

--- linux-2.4.31/fs/isofs/inode.c~old	2005-08-10 16:18:48.000000000 +0400
+++ linux-2.4.31/fs/isofs/inode.c	2005-08-11 13:55:25.000000000 +0400
@@ -335,15 +335,15 @@
 			else if (!strcmp(value,"acorn")) popt->map = 'a';
 			else return 0;
 		}
-		if (!strcmp(this_char,"session") && value) {
+		else if (!strcmp(this_char,"session") && value) {
 			char * vpnt = value;
-			unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
+			int ivalue = simple_strtoul(vpnt, &vpnt, 0);
 			if(ivalue < 0 || ivalue >99) return 0;
 			popt->session=ivalue+1;
 		}
-		if (!strcmp(this_char,"sbsector") && value) {
+		else if (!strcmp(this_char,"sbsector") && value) {
 			char * vpnt = value;
-			unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
+			int ivalue = simple_strtoul(vpnt, &vpnt, 0);
 			if(ivalue < 0 || ivalue >660*512) return 0;
 			popt->sbsector=ivalue;
 		}

-- 
 Best regards, TEMHOTA-RIPN aka MJA13-RIPE
 System Administrator. mailto:temnota@kmv.ru


[-- Attachment #2: isofs-fix.diff --]
[-- Type: text/plain, Size: 868 bytes --]

--- linux-2.4.31/fs/isofs/inode.c~old	2005-08-10 16:18:48.000000000 +0400
+++ linux-2.4.31/fs/isofs/inode.c	2005-08-11 13:55:25.000000000 +0400
@@ -335,15 +335,15 @@
 			else if (!strcmp(value,"acorn")) popt->map = 'a';
 			else return 0;
 		}
-		if (!strcmp(this_char,"session") && value) {
+		else if (!strcmp(this_char,"session") && value) {
 			char * vpnt = value;
-			unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
+			int ivalue = simple_strtoul(vpnt, &vpnt, 0);
 			if(ivalue < 0 || ivalue >99) return 0;
 			popt->session=ivalue+1;
 		}
-		if (!strcmp(this_char,"sbsector") && value) {
+		else if (!strcmp(this_char,"sbsector") && value) {
 			char * vpnt = value;
-			unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
+			int ivalue = simple_strtoul(vpnt, &vpnt, 0);
 			if(ivalue < 0 || ivalue >660*512) return 0;
 			popt->sbsector=ivalue;
 		}

             reply	other threads:[~2005-08-11 11:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-11 11:01 Andrey J. Melnikoff (TEMHOTA) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-08-10 12:46 [PATCH] 2.4.31: fix isofs mount options parser Andrey J. Melnikoff (TEMHOTA)
2005-08-10 18:17 ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050811110122.GX9857@kmv.ru \
    --to=temnota@kmv.ru \
    --cc=bolya@ukrpost.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox