Browse code

core: ut - fix misleading indentation for IF blocks

- reported by latest gcc on debian sid

Daniel-Constantin Mierla authored on 15/09/2016 13:30:13
Showing 1 changed files
... ...
@@ -47,7 +47,7 @@ int user2uid(int* uid, int* gid, char* user)
47 47
 {
48 48
 	char* tmp;
49 49
 	struct passwd *pw_entry;
50
-	
50
+
51 51
 	if (user){
52 52
 		*uid=strtol(user, &tmp, 10);
53 53
 		if ((tmp==0) ||(*tmp)){
... ...
@@ -73,7 +73,7 @@ int group2gid(int* gid, char* group)
73 73
 {
74 74
 	char* tmp;
75 75
 	struct group  *gr_entry;
76
-	
76
+
77 77
 	if (group){
78 78
 		*gid=strtol(group, &tmp, 10);
79 79
 		if ((tmp==0) ||(*tmp)){
... ...
@@ -93,7 +93,7 @@ int group2gid(int* gid, char* group)
93 93
 
94 94
 /*
95 95
  * Replacement of timegm (does not exists on all platforms
96
- * Taken from 
96
+ * Taken from
97 97
  * http://lists.samba.org/archive/samba-technical/2002-November/025737.html
98 98
  */
99 99
 time_t _timegm(struct tm* t)
... ...
@@ -111,7 +111,7 @@ time_t _timegm(struct tm* t)
111 111
 		}
112 112
 		tl += 3600;
113 113
 	}
114
-	
114
+
115 115
 	tg = gmtime(&tl);
116 116
 	tg->tm_isdst = 0;
117 117
 	tb = mktime(tg);
... ...
@@ -173,7 +173,7 @@ char* as_asciiz(str* s)
173 173
 /* return system version (major.minor.minor2) as
174 174
  *  (major<<16)|(minor)<<8|(minor2)
175 175
  * (if some of them are missing, they are set to 0)
176
- * if the parameters are not null they are set to the coresp. part 
176
+ * if the parameters are not null they are set to the coresp. part
177 177
  */
178 178
 unsigned int get_sys_version(int* major, int* minor, int* minor2)
179 179
 {
... ...
@@ -182,7 +182,7 @@ unsigned int get_sys_version(int* major, int* minor, int* minor2)
182 182
 	int m2;
183 183
 	int m3;
184 184
 	char* p;
185
-	
185
+
186 186
 	memset (&un, 0, sizeof(un));
187 187
 	m1=m2=m3=0;
188 188
 	/* get sys version */
... ...
@@ -218,24 +218,24 @@ char* get_abs_pathname(str* base, str* file)
218 218
 	str ser_cfg;
219 219
 	char* buf, *dir, *res;
220 220
 	int len;
221
-  	
221
+
222 222
 	if (base == NULL) {
223 223
 		ser_cfg.s = cfg_file;
224 224
 		ser_cfg.len = strlen(cfg_file);
225 225
 		base = &ser_cfg;
226 226
 	}
227
-	
227
+
228 228
 	if (!base->s || base->len <= 0 || base->s[0] != '/') {
229 229
 		BUG("get_abs_pathname: Base file must be absolute pathname: "
230 230
 			"'%.*s'\n", STR_FMT(base));
231 231
 		return NULL;
232 232
 	}
233
-	
233
+
234 234
 	if (!file || !file->s || file->len <= 0) {
235 235
 		BUG("get_abs_pathname: Invalid 'file' parameter\n");
236 236
 		return NULL;
237 237
 	}
238
-	
238
+
239 239
 	if (file->s[0] == '/') {
240 240
 		/* This is an absolute pathname, make a zero terminated
241 241
 		 * copy and use it as it is */
... ...
@@ -257,7 +257,7 @@ char* get_abs_pathname(str* base, str* file)
257 257
 		memcpy(buf, base->s, base->len);
258 258
 		buf[base->len]=0;
259 259
 		dir = dirname(buf);
260
-		
260
+
261 261
 		len = strlen(dir);
262 262
 		if ((res = pkg_malloc(len + 1 + file->len + 1)) == NULL) {
263 263
 			ERR("get_abs_pathname: No memory left (pkg_malloc failed)\n");
... ...
@@ -321,7 +321,7 @@ void * ser_memmem(const void *b1, const void *b2, size_t len1, size_t len2)
321 321
 			if (memcmp(sp, pp, len2) == 0)
322 322
 				return sp;
323 323
 
324
-			sp++;
324
+		sp++;
325 325
 	}
326 326
 
327 327
 	return NULL;
... ...
@@ -352,7 +352,7 @@ void * ser_memrmem(const void *b1, const void *b2, size_t len1, size_t len2)
352 352
 			if (memcmp(sp, pp, len2) == 0)
353 353
 				return sp;
354 354
 
355
-			sp--;
355
+		sp--;
356 356
 	}
357 357
 
358 358
 	return NULL;