diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-01-17 14:33:28 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-01-17 17:15:59 +0100 |
commit | 8e3a4cb453dbb2c498376dada035308fbd16b5b4 (patch) | |
tree | f8d19b772bf92ce8ef54c96d001b6078bd8d250d /source/fitz | |
parent | f8cc285a4a9f8f7ff5227de35aa52cde75c12cb9 (diff) | |
download | mupdf-8e3a4cb453dbb2c498376dada035308fbd16b5b4.tar.xz |
pdf: Rename FZ_ERROR_OOM to FZ_ERROR_MEMORY.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/memory.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/fitz/memory.c b/source/fitz/memory.c index 4a498e44..870ec973 100644 --- a/source/fitz/memory.c +++ b/source/fitz/memory.c @@ -56,7 +56,7 @@ fz_malloc(fz_context *ctx, size_t size) p = do_scavenging_malloc(ctx, size); if (!p) - fz_throw(ctx, FZ_ERROR_OOM, "malloc of " FMT_zu " bytes failed", size); + fz_throw(ctx, FZ_ERROR_MEMORY, "malloc of " FMT_zu " bytes failed", size); return p; } @@ -75,11 +75,11 @@ fz_malloc_array(fz_context *ctx, size_t count, size_t size) return 0; if (count > SIZE_MAX / size) - fz_throw(ctx, FZ_ERROR_OOM, "malloc of array (" FMT_zu " x " FMT_zu " bytes) failed (size_t overflow)", count, size); + fz_throw(ctx, FZ_ERROR_MEMORY, "malloc of array (" FMT_zu " x " FMT_zu " bytes) failed (size_t overflow)", count, size); p = do_scavenging_malloc(ctx, count * size); if (!p) - fz_throw(ctx, FZ_ERROR_OOM, "malloc of array (" FMT_zu " x " FMT_zu " bytes) failed", count, size); + fz_throw(ctx, FZ_ERROR_MEMORY, "malloc of array (" FMT_zu " x " FMT_zu " bytes) failed", count, size); return p; } @@ -108,13 +108,13 @@ fz_calloc(fz_context *ctx, size_t count, size_t size) if (count > SIZE_MAX / size) { - fz_throw(ctx, FZ_ERROR_OOM, "calloc (" FMT_zu " x " FMT_zu " bytes) failed (size_t overflow)", count, size); + fz_throw(ctx, FZ_ERROR_MEMORY, "calloc (" FMT_zu " x " FMT_zu " bytes) failed (size_t overflow)", count, size); } p = do_scavenging_malloc(ctx, count * size); if (!p) { - fz_throw(ctx, FZ_ERROR_OOM, "calloc (" FMT_zu " x " FMT_zu " bytes) failed", count, size); + fz_throw(ctx, FZ_ERROR_MEMORY, "calloc (" FMT_zu " x " FMT_zu " bytes) failed", count, size); } memset(p, 0, count*size); return p; @@ -154,11 +154,11 @@ fz_resize_array(fz_context *ctx, void *p, size_t count, size_t size) } if (count > SIZE_MAX / size) - fz_throw(ctx, FZ_ERROR_OOM, "resize array (" FMT_zu " x " FMT_zu " bytes) failed (size_t overflow)", count, size); + fz_throw(ctx, FZ_ERROR_MEMORY, "resize array (" FMT_zu " x " FMT_zu " bytes) failed (size_t overflow)", count, size); np = do_scavenging_realloc(ctx, p, count * size); if (!np) - fz_throw(ctx, FZ_ERROR_OOM, "resize array (" FMT_zu " x " FMT_zu " bytes) failed", count, size); + fz_throw(ctx, FZ_ERROR_MEMORY, "resize array (" FMT_zu " x " FMT_zu " bytes) failed", count, size); return np; } |