Skip to content

Commit 14cc1ed

Browse files
author
Michael Meskes
committed
Made function better readable.
1 parent 6e3117c commit 14cc1ed

File tree

1 file changed

+6
-5
lines changed
  • src/interfaces/ecpg/ecpglib

1 file changed

+6
-5
lines changed

src/interfaces/ecpg/ecpglib/misc.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.52 2009/09/18 13:13:32 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.53 2009/11/24 16:30:31 meskes Exp $ */
22

33
#define POSTGRES_ECPG_INTERNAL
44
#include "postgres_fe.h"
@@ -364,10 +364,11 @@ ECPGset_noind_null(enum ECPGttype type, void *ptr)
364364
static bool
365365
_check(unsigned char *ptr, int length)
366366
{
367-
for (; length > 0 && ptr[--length] == 0xff;);
368-
if (length <= 0)
369-
return true;
370-
return false;
367+
for (length--; length >= 0; length--)
368+
if (ptr[length] != 0xff)
369+
return false;
370+
371+
return true;
371372
}
372373

373374
bool

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy