util.c (ea8c5356d39048bc94bae068228f51ddbecc6b89) | util.c (1fae7cf05293d3a2c9e59c1bc59372322386467c) |
---|---|
1/* 2 * random utiility code, for bcache but in theory not specific to bcache 3 * 4 * Copyright 2010, 2011 Kent Overstreet <kent.overstreet@gmail.com> 5 * Copyright 2012 Google, Inc. 6 */ 7 8#include <linux/bio.h> --- 119 unchanged lines hidden (view full) --- 128 if (p[i]) 129 return false; 130 return true; 131} 132 133int bch_parse_uuid(const char *s, char *uuid) 134{ 135 size_t i, j, x; | 1/* 2 * random utiility code, for bcache but in theory not specific to bcache 3 * 4 * Copyright 2010, 2011 Kent Overstreet <kent.overstreet@gmail.com> 5 * Copyright 2012 Google, Inc. 6 */ 7 8#include <linux/bio.h> --- 119 unchanged lines hidden (view full) --- 128 if (p[i]) 129 return false; 130 return true; 131} 132 133int bch_parse_uuid(const char *s, char *uuid) 134{ 135 size_t i, j, x; |
136 |
|
136 memset(uuid, 0, 16); 137 138 for (i = 0, j = 0; 139 i < strspn(s, "-0123456789:ABCDEFabcdef") && j < 32; 140 i++) { 141 x = s[i] | 32; 142 143 switch (x) { --- 269 unchanged lines hidden --- | 137 memset(uuid, 0, 16); 138 139 for (i = 0, j = 0; 140 i < strspn(s, "-0123456789:ABCDEFabcdef") && j < 32; 141 i++) { 142 x = s[i] | 32; 143 144 switch (x) { --- 269 unchanged lines hidden --- |