Remove unused variable in receive-pack.
We aren't using this return code variable for anything so lets just get rid of it to keep this section of code clean. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>maint
							parent
							
								
									b807770924
								
							
						
					
					
						commit
						861ed12106
					
				|  | @ -273,11 +273,10 @@ static void read_head_info(void) | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
| static const char *unpack(int *error_code) | static const char *unpack(void) | ||||||
| { | { | ||||||
| 	int code = run_command_v_opt(1, unpacker, RUN_GIT_CMD); | 	int code = run_command_v_opt(1, unpacker, RUN_GIT_CMD); | ||||||
|  |  | ||||||
| 	*error_code = 0; |  | ||||||
| 	switch (code) { | 	switch (code) { | ||||||
| 	case 0: | 	case 0: | ||||||
| 		return NULL; | 		return NULL; | ||||||
|  | @ -294,7 +293,6 @@ static const char *unpack(int *error_code) | ||||||
| 	case -ERR_RUN_COMMAND_WAITPID_NOEXIT: | 	case -ERR_RUN_COMMAND_WAITPID_NOEXIT: | ||||||
| 		return "unpacker died strangely"; | 		return "unpacker died strangely"; | ||||||
| 	default: | 	default: | ||||||
| 		*error_code = -code; |  | ||||||
| 		return "unpacker exited with error code"; | 		return "unpacker exited with error code"; | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  | @ -345,8 +343,7 @@ int main(int argc, char **argv) | ||||||
|  |  | ||||||
| 	read_head_info(); | 	read_head_info(); | ||||||
| 	if (commands) { | 	if (commands) { | ||||||
| 		int code; | 		const char *unpack_status = unpack(); | ||||||
| 		const char *unpack_status = unpack(&code); |  | ||||||
| 		if (!unpack_status) | 		if (!unpack_status) | ||||||
| 			execute_commands(); | 			execute_commands(); | ||||||
| 		if (report_status) | 		if (report_status) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 Shawn Pearce
						Shawn Pearce