Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: vboot_firmware/lib/stateful_util.c

Issue 2833012: Move all system includes in vboot_firmware to sysincludes.h (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Oops, forgot the new header Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « vboot_firmware/lib/rollback_index.c ('k') | vboot_firmware/lib/vboot_kernel.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Stub implementations of utility functions which call their linux-specific 5 * Stub implementations of utility functions which call their linux-specific
6 * equivalents. 6 * equivalents.
7 */ 7 */
8 8
9 #include "stateful_util.h" 9 #include "stateful_util.h"
10 10
11 #include <stdarg.h> 11 #include "utility.h"
12 #include <stdio.h>
13 #include <stdlib.h>
14 12
15 void* StatefulSkip(MemcpyState* state, uint64_t len) { 13 void* StatefulSkip(MemcpyState* state, uint64_t len) {
16 if (state->overrun) 14 if (state->overrun)
17 return NULL; 15 return NULL;
18 if (len > state->remaining_len) { 16 if (len > state->remaining_len) {
19 state->overrun = 1; 17 state->overrun = 1;
20 return NULL; 18 return NULL;
21 } 19 }
22 state->remaining_buf += len; 20 state->remaining_buf += len;
23 state->remaining_len -= len; 21 state->remaining_len -= len;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return NULL; 56 return NULL;
59 if (len > state->remaining_len) { 57 if (len > state->remaining_len) {
60 state->overrun = 1; 58 state->overrun = 1;
61 return NULL; 59 return NULL;
62 } 60 }
63 Memset(state->remaining_buf, val, len); 61 Memset(state->remaining_buf, val, len);
64 state->remaining_buf += len; 62 state->remaining_buf += len;
65 state->remaining_len -= len; 63 state->remaining_len -= len;
66 return state; // have to return something non-NULL 64 return state; // have to return something non-NULL
67 } 65 }
OLDNEW
« no previous file with comments | « vboot_firmware/lib/rollback_index.c ('k') | vboot_firmware/lib/vboot_kernel.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698