We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bcdcf1 commit c0d6bfeCopy full SHA for c0d6bfe
hammingdec.c
@@ -26,13 +26,7 @@ void kontrolbit(int *kod, int lengh)
26
}
27
i++;
28
29
- if(errorpos != 0)
30
- {
31
- if(kod[errorpos] == 0)
32
- kod[errorpos] = 1;
33
- else
34
- kod[errorpos] = 0;
35
- }
+ kod[errorpos] = (errorpos != 0) ? !kod[errorpos] : kod[errorpos];
36
37
38
void invert(int *byte)
0 commit comments