Ticket #12825: 0012-net_buffer.cpp-fix-clang-warning.patch

File 0012-net_buffer.cpp-fix-clang-warning.patch, 892 bytes (added by mt, 8 years ago)
  • src/add-ons/kernel/network/stack/net_buffer.cpp

    From 8bce5141e2023060d1f4548bb4deda53fed297da Mon Sep 17 00:00:00 2001
    From: Murai Takashi <tmurai01@gmail.com>
    Date: Tue, 21 Jun 2016 06:32:17 +0900
    Subject: [PATCH 12/13] net_buffer.cpp: fix clang warning.
    
    left is unsigned, so condition is always true.
    ---
     src/add-ons/kernel/network/stack/net_buffer.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/add-ons/kernel/network/stack/net_buffer.cpp b/src/add-ons/kernel/network/stack/net_buffer.cpp
    index 8265d92..d8c4fe1 100644
    a b remove_header(net_buffer* _buffer, size_t bytes)  
    18201820    size_t left = bytes;
    18211821    data_node* node = NULL;
    18221822
    1823     while (left >= 0) {
     1823    while (left > 0) {
    18241824        node = (data_node*)list_get_first_item(&buffer->buffers);
    18251825        if (node == NULL) {
    18261826            if (left == 0)