Applied patches from Markus Becker (thanks!)

* 0001-Trailing-whitespace-cleanup.patch
* 0001-Went-back-to-2.65-of-autoconf.patch
* 0002-Fix-compiler-warning-for-str.patch
* added several files to Makefile target .gitignore
This commit is contained in:
Olaf Bergmann committed 2010-11-22 13:01:00 +01:00
1 parent 23fc3b0246
commit 758b7f775e
22 files changed
+474 -474

No files matched your search

+5 -5
View File
@@ -1,17 +1,17 @@
/* encode.c -- encoding and decoding of CoAP data types
*
* Copyright (C) 2010 Olaf Bergmann <bergmann@tzi.org>, Carsten Bormann
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -35,7 +35,7 @@ unsigned int
coap_decode_var_bytes(unsigned char *buf,unsigned int len) {
unsigned int i, n = 0;
for (i = 0; i < len; ++i)
n = (n << 8) + buf[i];
n = (n << 8) + buf[i];
return n;
}
@@ -45,7 +45,7 @@ coap_encode_var_bytes(unsigned char *buf, unsigned int val) {
int n, i = val >> 1;
for (n = 0; i; n++) /* FIXME: coap_fls() */
i >>= 1;
for (i = n / 8 + 1; i; --i) {
buf[i-1] = val & 0xff;
val >>= 8;