Re: [PATCH 1/5] Add generic 'strbuf_readlink()' helper function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 17, 2008 at 1:42 PM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> +       while (hint < STRBUF_MAXLINK) {
> +               int len;
> +
> +               strbuf_grow(sb, hint);
> +               len = readlink(path, sb->buf, hint);
> +               if (len < 0) {
> +                       if (errno != ERANGE)
> +                               break;
> +               } else if (len < hint) {
> +                       strbuf_setlen(sb, len);
> +                       return 0;
> +               }
> +
> +               /* .. the buffer was too small - try again */
> +               hint *= 2;
> +               continue;
> +       }

Why the continue statement at the end of the loop?

j.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux