View | Details | Raw Unified | Return to bug 1215099
Collapse All | Expand All

(-)a/errlog.c (+3 lines)
Lines 32-37 VLogError(const char *file, int line, const char *func, const CHAR16 *fmt, Link Here
32
	ms_va_list args2;
32
	ms_va_list args2;
33
	CHAR16 **newerrs;
33
	CHAR16 **newerrs;
34
34
35
	if (file == NULL || func == NULL || fmt == NULL)
36
		return EFI_INVALID_PARAMETER;
37
35
	newerrs = ReallocatePool(errs, (nerrs + 1) * sizeof(*errs),
38
	newerrs = ReallocatePool(errs, (nerrs + 1) * sizeof(*errs),
36
				       (nerrs + 3) * sizeof(*errs));
39
				       (nerrs + 3) * sizeof(*errs));
37
	if (!newerrs)
40
	if (!newerrs)
(-)a/shim.h (-7 / +20 lines)
Lines 281-298 verify_buffer (char *data, int datasize, Link Here
281
#ifndef SHIM_UNIT_TEST
281
#ifndef SHIM_UNIT_TEST
282
#define perror_(file, line, func, fmt, ...) ({					\
282
#define perror_(file, line, func, fmt, ...) ({					\
283
		UINTN __perror_ret = 0;						\
283
		UINTN __perror_ret = 0;						\
284
		_Static_assert((fmt) != NULL,					\
285
			       "format specifier cannot be NULL");		\
284
		if (!in_protocol)						\
286
		if (!in_protocol)						\
285
			__perror_ret = console_print((fmt), ##__VA_ARGS__);	\
287
			__perror_ret = console_print((fmt), ##__VA_ARGS__);	\
286
		LogError_(file, line, func, fmt, ##__VA_ARGS__);		\
288
		LogError_(file, line, func, fmt, ##__VA_ARGS__);		\
287
		__perror_ret;							\
289
		__perror_ret;							\
288
	})
290
	})
289
#define perror(fmt, ...) \
291
#define perror(fmt, ...) ({							\
290
	perror_(__FILE__, __LINE__ - 1, __func__, fmt, ##__VA_ARGS__)
292
		_Static_assert((fmt) != NULL,					\
291
#define LogError(fmt, ...) \
293
			       "format specifier cannot be NULL");		\
292
	LogError_(__FILE__, __LINE__ - 1, __func__, fmt, ##__VA_ARGS__)
294
		perror_(__FILE__, __LINE__ - 1, __func__, fmt, ##__VA_ARGS__);	\
295
	})
296
#define LogError(fmt, ...) ({							\
297
		_Static_assert((fmt) != NULL,					\
298
			       "format specifier cannot be NULL");		\
299
		LogError_(__FILE__, __LINE__ - 1, __func__, fmt, ##__VA_ARGS__);\
300
	})
293
#else
301
#else
294
#define perror(fmt, ...)
302
#define perror(fmt, ...) ({							\
295
#define LogError(fmt, ...)
303
		_Static_assert((fmt) != NULL,					\
304
			       "format specifier cannot be NULL");		\
305
	})
306
#define LogError(fmt, ...) ({							\
307
		_Static_assert((fmt) != NULL,					\
308
			       "format specifier cannot be NULL");		\
309
	})
296
#endif
310
#endif
297
311
298
#ifdef ENABLE_SHIM_DEVEL
312
#ifdef ENABLE_SHIM_DEVEL
299
- 

Return to bug 1215099