From 327f550669a80d72f36bc9e4de619c163aa46eff Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 29 Nov 2013 16:45:45 +0100 Subject: Use unsigned printf/scanf conversion where more appropriate Signed-off-by: Denys Vlasenko --- editors/patch_bbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editors') diff --git a/editors/patch_bbox.c b/editors/patch_bbox.c index 78aa5fd..aae7b79 100644 --- a/editors/patch_bbox.c +++ b/editors/patch_bbox.c @@ -188,8 +188,8 @@ int patch_main(int argc UNUSED_PARAM, char **argv) unsigned src_last_line = 1; unsigned dst_last_line = 1; - if ((sscanf(patch_line, "@@ -%d,%d +%d,%d", &src_beg_line, &src_last_line, &dst_beg_line, &dst_last_line) < 3) - && (sscanf(patch_line, "@@ -%d +%d,%d", &src_beg_line, &dst_beg_line, &dst_last_line) < 2) + if ((sscanf(patch_line, "@@ -%u,%u +%u,%u", &src_beg_line, &src_last_line, &dst_beg_line, &dst_last_line) < 3) + && (sscanf(patch_line, "@@ -%u +%u,%u", &src_beg_line, &dst_beg_line, &dst_last_line) < 2) ) { /* No more hunks for this file */ break; -- cgit v1.1