Skip to content

Commit b7ac2a7

Browse files
committed
bpo-29859: Remove redundant variable assignment and set error indicator
1 parent 0bc0136 commit b7ac2a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Python/thread_pthread.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ typedef struct {
143143
} pthread_lock;
144144

145145
#define CHECK_STATUS(name) if (status != 0) { perror(name); error = 1; }
146-
#define CHECK_STATUS_PTHREAD(name) if (status != 0) { char* strerror_msg = strerror(status); fprintf(stderr, "%s: %s\n", name, strerror_msg); }
146+
#define CHECK_STATUS_PTHREAD(name) if (status != 0) { fprintf(stderr, \
147+
"%s: %s\n", name, strerror(status)); error = 1; }
147148

148149
/*
149150
* Initialization.

0 commit comments

Comments
 (0)