mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-04 21:08:10 +02:00
Add a missing _cairo_error() to a bunch of status returns.
This commit is contained in:
parent
af3a892c3e
commit
1d72e53c3e
3 changed files with 10 additions and 10 deletions
|
|
@ -288,7 +288,7 @@ _cairo_validate_text_clusters (const char *utf8,
|
|||
/* Make sure we've got valid UTF-8 for the cluster */
|
||||
status = _cairo_utf8_to_ucs4 (utf8+n_bytes, cluster_bytes, NULL, NULL);
|
||||
if (unlikely (status))
|
||||
return CAIRO_STATUS_INVALID_CLUSTERS;
|
||||
return _cairo_error (CAIRO_STATUS_INVALID_CLUSTERS);
|
||||
|
||||
n_bytes += cluster_bytes ;
|
||||
n_glyphs += cluster_glyphs;
|
||||
|
|
@ -296,7 +296,7 @@ _cairo_validate_text_clusters (const char *utf8,
|
|||
|
||||
if (n_bytes != (unsigned int) utf8_len || n_glyphs != (unsigned int) num_glyphs) {
|
||||
BAD:
|
||||
return CAIRO_STATUS_INVALID_CLUSTERS;
|
||||
return _cairo_error (CAIRO_STATUS_INVALID_CLUSTERS);
|
||||
}
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -1529,7 +1529,7 @@ cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font,
|
|||
/* glyphs and num_glyphs can't be NULL */
|
||||
if (glyphs == NULL ||
|
||||
num_glyphs == NULL) {
|
||||
status = CAIRO_STATUS_NULL_POINTER;
|
||||
status = _cairo_error (CAIRO_STATUS_NULL_POINTER);
|
||||
goto BAIL;
|
||||
}
|
||||
|
||||
|
|
@ -1541,7 +1541,7 @@ cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font,
|
|||
if ((utf8_len && utf8 == NULL) ||
|
||||
(clusters && num_clusters == NULL) ||
|
||||
(clusters && cluster_flags == NULL)) {
|
||||
status = CAIRO_STATUS_NULL_POINTER;
|
||||
status = _cairo_error (CAIRO_STATUS_NULL_POINTER);
|
||||
goto BAIL;
|
||||
}
|
||||
|
||||
|
|
@ -1573,7 +1573,7 @@ cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font,
|
|||
if (utf8_len < 0 ||
|
||||
*num_glyphs < 0 ||
|
||||
(num_clusters && *num_clusters < 0)) {
|
||||
status = CAIRO_STATUS_NEGATIVE_COUNT;
|
||||
status = _cairo_error (CAIRO_STATUS_NEGATIVE_COUNT);
|
||||
goto BAIL;
|
||||
}
|
||||
|
||||
|
|
@ -1609,22 +1609,22 @@ cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font,
|
|||
* can be hard to get right. */
|
||||
|
||||
if (*num_glyphs < 0) {
|
||||
status = CAIRO_STATUS_NEGATIVE_COUNT;
|
||||
status = _cairo_error (CAIRO_STATUS_NEGATIVE_COUNT);
|
||||
goto DONE;
|
||||
}
|
||||
if (num_glyphs && *glyphs == NULL) {
|
||||
status = CAIRO_STATUS_NULL_POINTER;
|
||||
status = _cairo_error (CAIRO_STATUS_NULL_POINTER);
|
||||
goto DONE;
|
||||
}
|
||||
|
||||
if (clusters) {
|
||||
|
||||
if (*num_clusters < 0) {
|
||||
status = CAIRO_STATUS_NEGATIVE_COUNT;
|
||||
status = _cairo_error (CAIRO_STATUS_NEGATIVE_COUNT);
|
||||
goto DONE;
|
||||
}
|
||||
if (num_clusters && *clusters == NULL) {
|
||||
status = CAIRO_STATUS_NULL_POINTER;
|
||||
status = _cairo_error (CAIRO_STATUS_NULL_POINTER);
|
||||
goto DONE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2868,7 +2868,7 @@ cairo_set_scaled_font (cairo_t *cr,
|
|||
return;
|
||||
|
||||
if (scaled_font == NULL) {
|
||||
status = CAIRO_STATUS_NULL_POINTER;
|
||||
status = _cairo_error (CAIRO_STATUS_NULL_POINTER);
|
||||
goto BAIL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue