[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patch-gnuradio] Patch for gri_glfsr.h
From: |
Eudean Sun |
Subject: |
[Patch-gnuradio] Patch for gri_glfsr.h |
Date: |
Sat, 04 Sep 2010 00:17:45 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 |
I have a short patch for gri_glfsr.h. I haven't filled out a copyright
form but this is very short so hopefully it won't be an issue.
Description of bug:
In file gnuradio-core/src/lib/general/gri_glfsr.h, the variable
d_shift_register is declared as a signed integer. When right shifted in
function next_bit(), this produces an arithmetic instead of a logical
shift, which gives incorrect results. Fixed by making d_shift_register and
d_mask unsigned integers.
Also in this file, the constructor should use an initialization list to
initialize the member variables.
ChangeLog entry:
Changed d_shift_register and d_mask from signed to unsigned. Moved member
variable initialization from constructor body to initialization list.
Patch is attached.
Eudean
gri_glfsr_patch.diff
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Patch-gnuradio] Patch for gri_glfsr.h,
Eudean Sun <=