mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 01:18:00 +00:00
1b851758bd
My experimental build with clang-cl at -Wall did show up a few things that are safe enough to fix right now. One was this list of missing includes, which was causing a lot of -Wmissing-prototype warnings, and is a real risk because it means the declarations in headers weren't being type-checked against the actual function definitions. Happily, no actual mismatches.
18 lines
411 B
C
18 lines
411 B
C
/*
|
|
* Utility function to convert a textual representation of an X11
|
|
* auth protocol name into our integer protocol ids.
|
|
*/
|
|
|
|
#include "putty.h"
|
|
#include "ssh.h"
|
|
|
|
int x11_identify_auth_proto(ptrlen protoname)
|
|
{
|
|
int protocol;
|
|
|
|
for (protocol = 1; protocol < lenof(x11_authnames); protocol++)
|
|
if (ptrlen_eq_string(protoname, x11_authnames[protocol]))
|
|
return protocol;
|
|
return -1;
|
|
}
|