Browse code

reorder some struct fields to avoid holes

git-svn: trunk@4355

Török Edvin authored on 2008/11/09 01:26:30
Showing 4 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sat Nov  8 17:24:59 EET 2008 (edwin)
2
+------------------------------------
3
+ * libclamav/blob.h, libclamav/cab.h, libclamav/jsparse/js-norm.c: 
4
+ reorder some struct fields to avoid holes
5
+
1 6
 Sat Nov  8 05:27:43 CET 2008 (acab)
2 7
 -----------------------------------
3 8
  * libclamav/mpool.c: slightly optimized (we're now faster and more compact
... ...
@@ -52,7 +52,6 @@ int	blobGrow(blob *b, size_t len);
52 52
  */
53 53
 typedef	struct fileblob {
54 54
 	FILE	*fp;
55
-	int	fd;
56 55
 	blob	b;	/*
57 56
 			 * b.name is the name of the attachment as stored in the
58 57
 			 * email, not the full path name of the temporary file
... ...
@@ -60,6 +59,7 @@ typedef	struct fileblob {
60 60
 	char	*fullname;	/* full pathname of the file */
61 61
 	cli_ctx	*ctx;	/* When set we can scan the blob, otherwise NULL */
62 62
 	unsigned	long	bytes_scanned;
63
+	int	fd;
63 64
 	unsigned	int	isNotEmpty : 1;
64 65
 	unsigned	int	isInfected : 1;
65 66
 } fileblob;
... ...
@@ -57,10 +57,10 @@ struct cab_file {
57 57
     int lread;
58 58
     int fd;
59 59
     int ofd;
60
+    uint16_t attribs;
60 61
     struct cab_folder *folder;
61 62
     struct cab_file *next;
62 63
     struct cab_archive *cab;
63
-    uint16_t attribs;
64 64
 };
65 65
 
66 66
 struct cab_folder {
... ...
@@ -106,14 +106,14 @@ struct tokens {
106 106
 
107 107
 /* state for the current JS file being parsed */
108 108
 struct parser_state {
109
-	unsigned long     var_uniq;
110
-	unsigned long     syntax_errors;
111
-	unsigned int      rec;
112 109
 	struct scope *global;
113 110
 	struct scope *current;
114 111
 	struct scope *list;
115 112
 	yyscan_t scanner;
116 113
 	struct tokens tokens;
114
+	unsigned long     var_uniq;
115
+	unsigned long     syntax_errors;
116
+	unsigned int      rec;
117 117
 };
118 118
 
119 119
 static struct scope* scope_new(struct parser_state *state)