1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-19 04:41:50 +00:00

cache sync: avoid "l" and such as a variable name, note vanilla changes

This commit is contained in:
Marian Beermann 2017-06-10 10:12:06 +02:00
parent 5eb43b8464
commit 0e31f78dd6
2 changed files with 11 additions and 7 deletions

View file

@ -288,7 +288,6 @@ static inline int unpack_callback_array_end(unpack_user* u)
return 0;
}
}
return 0;
}
@ -317,6 +316,7 @@ static inline int unpack_callback_map(unpack_user* u, unsigned int n)
static inline int unpack_callback_map_item(unpack_user* u, unsigned int current)
{
(void)u; (void)current;
if(u->level == 1) {
switch(u->expect) {
case expect_map_item_end:
@ -340,7 +340,7 @@ static inline int unpack_callback_map_end(unpack_user* u)
return 0;
}
static inline int unpack_callback_raw(unpack_user* u, const char* b, const char* p, unsigned int l)
static inline int unpack_callback_raw(unpack_user* u, const char* b, const char* p, unsigned int length)
{
/* raw = what Borg uses for binary stuff and strings as well */
/* Note: p points to an internal buffer which contains l bytes. */
@ -348,7 +348,7 @@ static inline int unpack_callback_raw(unpack_user* u, const char* b, const char*
switch(u->expect) {
case expect_key:
if(l != 32) {
if(length != 32) {
SET_LAST_ERROR("Incorrect key length");
return -1;
}
@ -356,7 +356,7 @@ static inline int unpack_callback_raw(unpack_user* u, const char* b, const char*
u->expect = expect_size;
break;
case expect_chunks_map_key:
if(l == 6 && !memcmp("chunks", p, 6)) {
if(length == 6 && !memcmp("chunks", p, 6)) {
u->expect = expect_chunks_begin;
u->inside_chunks = 1;
} else {
@ -369,13 +369,12 @@ static inline int unpack_callback_raw(unpack_user* u, const char* b, const char*
return -1;
}
}
return 0;
}
static inline int unpack_callback_bin(unpack_user* u, const char* b, const char* p, unsigned int l)
static inline int unpack_callback_bin(unpack_user* u, const char* b, const char* p, unsigned int length)
{
(void)u; (void)b; (void)p; (void)l;
(void)u; (void)b; (void)p; (void)length;
UNEXPECTED("bin");
return 0;
}

View file

@ -15,6 +15,11 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* This has been slightly adapted from the vanilla msgpack-{c, python} version.
* Since cache_sync does not intend to build an output data structure,
* msgpack_unpack_object and all of its uses was removed.
*/
#ifndef USE_CASE_RANGE