Skip to content

Commit 069a93b

Browse files
committed
btrfs-progs: add shortcut for memory allocation error reporting
Signed-off-by: David Sterba <[email protected]>
1 parent 285fbd7 commit 069a93b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

common/messages.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,7 @@ enum common_error {
200200
__attribute__ ((format (printf, 2, 3)))
201201
void error_msg(enum common_error error, const char *msg, ...);
202202

203+
/* Shortcuts for most common errors. */
204+
#define error_mem(...) error_msg(ERROR_MSG_MEMORY, ##__VA_ARGS__)
205+
203206
#endif

0 commit comments

Comments
 (0)