From: Nick Bowler Date: Fri, 4 May 2012 21:22:12 +0000 (-0400) Subject: libupkg: Add const qualifier to upkg_decode_index input buffer. X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/commitdiff_plain/cd47643a141ee32ad929bfd81a9821adf9cf9715?hp=5d07f9f60e580dea0474905f66e00983223c540c libupkg: Add const qualifier to upkg_decode_index input buffer. --- diff --git a/src/libupkg.c b/src/libupkg.c index 3ecce7f..5a9dce7 100644 --- a/src/libupkg.c +++ b/src/libupkg.c @@ -110,7 +110,7 @@ const struct upkg_file_ops upkg_default_fops = { * Stores the result in *val and returns the number of input bytes read (or 0 * if the input is invalid, in which case *val is undefined). */ -size_t upkg_decode_index(long *val, unsigned char *bytes, size_t n) +size_t upkg_decode_index(long *val, const unsigned char *bytes, size_t n) { *val = 0; diff --git a/src/upkg.h b/src/upkg.h index 2885643..34291b7 100644 --- a/src/upkg.h +++ b/src/upkg.h @@ -115,6 +115,6 @@ int upkg_export_seek(struct upkg_file *f, long offset, int whence); long upkg_export_tell(struct upkg_file *f); void upkg_export_close(struct upkg_file *f); -size_t upkg_decode_index(long *val, unsigned char *bytes, size_t n); +size_t upkg_decode_index(long *val, const unsigned char *bytes, size_t n); #endif