audio_parser: renamed parameter "error" to "error_r"
It's a double pointer.
This commit is contained in:
		@@ -37,7 +37,8 @@ audio_parser_quark(void)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool
 | 
					bool
 | 
				
			||||||
audio_format_parse(struct audio_format *dest, const char *src, GError **error)
 | 
					audio_format_parse(struct audio_format *dest, const char *src,
 | 
				
			||||||
 | 
							   GError **error_r)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	char *endptr;
 | 
						char *endptr;
 | 
				
			||||||
	unsigned long value;
 | 
						unsigned long value;
 | 
				
			||||||
@@ -50,15 +51,15 @@ audio_format_parse(struct audio_format *dest, const char *src, GError **error)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	value = strtoul(src, &endptr, 10);
 | 
						value = strtoul(src, &endptr, 10);
 | 
				
			||||||
	if (endptr == src) {
 | 
						if (endptr == src) {
 | 
				
			||||||
		g_set_error(error, audio_parser_quark(), 0,
 | 
							g_set_error(error_r, audio_parser_quark(), 0,
 | 
				
			||||||
			    "Sample rate missing");
 | 
								    "Sample rate missing");
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	} else if (*endptr != ':') {
 | 
						} else if (*endptr != ':') {
 | 
				
			||||||
		g_set_error(error, audio_parser_quark(), 0,
 | 
							g_set_error(error_r, audio_parser_quark(), 0,
 | 
				
			||||||
			    "Sample format missing");
 | 
								    "Sample format missing");
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	} else if (!audio_valid_sample_rate(value)) {
 | 
						} else if (!audio_valid_sample_rate(value)) {
 | 
				
			||||||
		g_set_error(error, audio_parser_quark(), 0,
 | 
							g_set_error(error_r, audio_parser_quark(), 0,
 | 
				
			||||||
			    "Invalid sample rate: %lu", value);
 | 
								    "Invalid sample rate: %lu", value);
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -70,15 +71,15 @@ audio_format_parse(struct audio_format *dest, const char *src, GError **error)
 | 
				
			|||||||
	src = endptr + 1;
 | 
						src = endptr + 1;
 | 
				
			||||||
	value = strtoul(src, &endptr, 10);
 | 
						value = strtoul(src, &endptr, 10);
 | 
				
			||||||
	if (endptr == src) {
 | 
						if (endptr == src) {
 | 
				
			||||||
		g_set_error(error, audio_parser_quark(), 0,
 | 
							g_set_error(error_r, audio_parser_quark(), 0,
 | 
				
			||||||
			    "Sample format missing");
 | 
								    "Sample format missing");
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	} else if (*endptr != ':') {
 | 
						} else if (*endptr != ':') {
 | 
				
			||||||
		g_set_error(error, audio_parser_quark(), 0,
 | 
							g_set_error(error_r, audio_parser_quark(), 0,
 | 
				
			||||||
			    "Channel count missing");
 | 
								    "Channel count missing");
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	} else if (!audio_valid_sample_format(value)) {
 | 
						} else if (!audio_valid_sample_format(value)) {
 | 
				
			||||||
		g_set_error(error, audio_parser_quark(), 0,
 | 
							g_set_error(error_r, audio_parser_quark(), 0,
 | 
				
			||||||
			    "Invalid sample format: %lu", value);
 | 
								    "Invalid sample format: %lu", value);
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -90,7 +91,7 @@ audio_format_parse(struct audio_format *dest, const char *src, GError **error)
 | 
				
			|||||||
	src = endptr + 1;
 | 
						src = endptr + 1;
 | 
				
			||||||
	value = strtoul(src, &endptr, 10);
 | 
						value = strtoul(src, &endptr, 10);
 | 
				
			||||||
	if (*endptr != 0 || !audio_valid_channel_count(value)) {
 | 
						if (*endptr != 0 || !audio_valid_channel_count(value)) {
 | 
				
			||||||
		g_set_error(error, audio_parser_quark(), 0,
 | 
							g_set_error(error_r, audio_parser_quark(), 0,
 | 
				
			||||||
			    "Invalid channel count: %s", src);
 | 
								    "Invalid channel count: %s", src);
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,11 +37,12 @@ struct audio_format;
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * @param dest the destination #audio_format struct
 | 
					 * @param dest the destination #audio_format struct
 | 
				
			||||||
 * @param src the input string
 | 
					 * @param src the input string
 | 
				
			||||||
 * @param error location to store the error occuring, or NULL to
 | 
					 * @param error_r location to store the error occuring, or NULL to
 | 
				
			||||||
 * ignore errors
 | 
					 * ignore errors
 | 
				
			||||||
 * @return true on success
 | 
					 * @return true on success
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
bool
 | 
					bool
 | 
				
			||||||
audio_format_parse(struct audio_format *dest, const char *src, GError **error);
 | 
					audio_format_parse(struct audio_format *dest, const char *src,
 | 
				
			||||||
 | 
							   GError **error_r);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user