Improve some signed vs. unsigned comparisons
p2-fwd will always be non-negative Change-Id: I143d7fd3c5ec192ffaeb56bc2e9f45ac5e83cb6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133439 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
bdff0bb77b
commit
a8d01742e9
@ -30,6 +30,7 @@
|
|||||||
#include <com/sun/star/ucb/OpenMode.hpp>
|
#include <com/sun/star/ucb/OpenMode.hpp>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <rtl/uri.hxx>
|
#include <rtl/uri.hxx>
|
||||||
|
#include <o3tl/safeint.hxx>
|
||||||
|
|
||||||
#include "ftpurl.hxx"
|
#include "ftpurl.hxx"
|
||||||
#include "ftpcontentprovider.hxx"
|
#include "ftpcontentprovider.hxx"
|
||||||
@ -458,8 +459,8 @@ std::vector<FTPDirentry> FTPURL::list(
|
|||||||
OUString viewurl(ident(true,false));
|
OUString viewurl(ident(true,false));
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
while(p2-fwd < int(len) && *p2 != '\n') ++p2;
|
while(o3tl::make_unsigned(p2-fwd) < len && *p2 != '\n') ++p2;
|
||||||
if(p2-fwd == int(len)) break;
|
if(o3tl::make_unsigned(p2-fwd) == len) break;
|
||||||
|
|
||||||
*p2 = 0;
|
*p2 = 0;
|
||||||
switch(osKind) {
|
switch(osKind) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user