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

Side by Side Diff: fusl/src/network/gai_strerror.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 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
OLDNEW
1 #include <netdb.h> 1 #include <netdb.h>
2 #include "locale_impl.h" 2 #include "locale_impl.h"
3 3
4 static const char msgs[] = 4 static const char msgs[] =
5 » "Invalid flags\0" 5 "Invalid flags\0"
6 » "Name does not resolve\0" 6 "Name does not resolve\0"
7 » "Try again\0" 7 "Try again\0"
8 » "Non-recoverable error\0" 8 "Non-recoverable error\0"
9 » "Unknown error\0" 9 "Unknown error\0"
10 » "Unrecognized address family or invalid length\0" 10 "Unrecognized address family or invalid length\0"
11 » "Unrecognized socket type\0" 11 "Unrecognized socket type\0"
12 » "Unrecognized service\0" 12 "Unrecognized service\0"
13 » "Unknown error\0" 13 "Unknown error\0"
14 » "Out of memory\0" 14 "Out of memory\0"
15 » "System error\0" 15 "System error\0"
16 » "Overflow\0" 16 "Overflow\0"
17 » "\0Unknown error"; 17 "\0Unknown error";
18 18
19 const char *gai_strerror(int ecode) 19 const char* gai_strerror(int ecode) {
20 { 20 const char* s;
21 » const char *s; 21 for (s = msgs, ecode++; ecode && *s; ecode++, s++)
22 » for (s=msgs, ecode++; ecode && *s; ecode++, s++) for (; *s; s++); 22 for (; *s; s++)
23 » if (!*s) s++; 23 ;
24 » return LCTRANS_CUR(s); 24 if (!*s)
25 s++;
26 return LCTRANS_CUR(s);
25 } 27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698