Discussion:
[PATCH 2/9] isofs: inline macros in rock.c
(too old to reply)
Pekka Enberg
2005-03-28 17:48:45 UTC
Permalink
This patch inlines the CONTINUE_DECLS macro in fs/isofs/rock.c.

Signed-off-by: Pekka Enberg <***@cs.helsinki.fi>
---

rock.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)

Index: 2.6/fs/isofs/rock.c
===================================================================
--- 2.6.orig/fs/isofs/rock.c 2005-03-28 16:27:39.000000000 +0300
+++ 2.6/fs/isofs/rock.c 2005-03-28 16:27:40.000000000 +0300
@@ -38,10 +38,6 @@
same thing in certain places. We use the macros to ensure that everything
is done correctly */

-#define CONTINUE_DECLS \
- int cont_extent = 0, cont_offset = 0, cont_size = 0; \
- void *buffer = NULL
-
#define CHECK_CE \
{cont_extent = isonum_733(rr->u.CE.extent); \
cont_offset = isonum_733(rr->u.CE.offset); \
@@ -95,7 +91,8 @@
{
int len;
unsigned char *chr;
- CONTINUE_DECLS;
+ int cont_extent = 0, cont_offset = 0, cont_size = 0;
+ void *buffer = NULL;
int retnamlen = 0, truncate = 0;

if (!ISOFS_SB(inode->i_sb)->s_rock)
@@ -184,7 +181,8 @@
int len;
unsigned char *chr;
int symlink_len = 0;
- CONTINUE_DECLS;
+ int cont_extent = 0, cont_offset = 0, cont_size = 0;
+ void *buffer = NULL;

if (!ISOFS_SB(inode->i_sb)->s_rock)
return 0;
@@ -527,7 +525,8 @@
char *rpnt = link;
unsigned char *pnt;
struct iso_directory_record *raw_inode;
- CONTINUE_DECLS;
+ int cont_extent = 0, cont_offset = 0, cont_size = 0;
+ void *buffer = NULL;
unsigned long block, offset;
int sig;
int len;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Pekka Enberg
2005-03-28 18:12:35 UTC
Permalink
This patch inlines the CHECK_CE macro in fs/isofs/rock.c.

Signed-off-by: Pekka Enberg <***@cs.helsinki.fi>
---

rock.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)

Index: 2.6/fs/isofs/rock.c
===================================================================
--- 2.6.orig/fs/isofs/rock.c 2005-03-28 16:27:40.000000000 +0300
+++ 2.6/fs/isofs/rock.c 2005-03-28 16:27:47.000000000 +0300
@@ -38,11 +38,6 @@
same thing in certain places. We use the macros to ensure that everything
is done correctly */

-#define CHECK_CE \
- {cont_extent = isonum_733(rr->u.CE.extent); \
- cont_offset = isonum_733(rr->u.CE.offset); \
- cont_size = isonum_733(rr->u.CE.size);}
-
#define SETUP_ROCK_RIDGE(DE,CHR,LEN) \
{LEN= sizeof(struct iso_directory_record) + DE->name_len[0]; \
if(LEN & 1) LEN++; \
@@ -124,7 +119,11 @@
CHECK_SP(goto out);
break;
case SIG('C', 'E'):
- CHECK_CE;
+ {
+ cont_extent = isonum_733(rr->u.CE.extent);
+ cont_offset = isonum_733(rr->u.CE.offset);
+ cont_size = isonum_733(rr->u.CE.size);
+ }
break;
case SIG('N', 'M'):
if (truncate)
@@ -224,7 +223,11 @@
CHECK_SP(goto out);
break;
case SIG('C', 'E'):
- CHECK_CE;
+ {
+ cont_extent = isonum_733(rr->u.CE.extent);
+ cont_offset = isonum_733(rr->u.CE.offset);
+ cont_size = isonum_733(rr->u.CE.size);
+ }
break;
case SIG('E', 'R'):
ISOFS_SB(inode->i_sb)->s_rock = 1;
@@ -585,7 +588,11 @@
break;
case SIG('C', 'E'):
/* This tells is if there is a continuation record */
- CHECK_CE;
+ {
+ cont_extent = isonum_733(rr->u.CE.extent);
+ cont_offset = isonum_733(rr->u.CE.offset);
+ cont_size = isonum_733(rr->u.CE.size);
+ }
default:
break;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



-------------------------------------------------------------------------------
Achtung: diese Newsgruppe ist eine unidirektional gegatete Mailingliste.
Antworten nur per Mail an die im Reply-To-Header angegebene Adresse.
Fragen zum Gateway -> ***@inka.de.
-------------------------------------------------------------------------------
Loading...