mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -05:00
Whitespace rationalisation of entire code base.
The number of people has been steadily increasing who read our source code with an editor that thinks tab stops are 4 spaces apart, as opposed to the traditional tty-derived 8 that the PuTTY code expects. So I've been wondering for ages about just fixing it, and switching to a spaces-only policy throughout the code. And I recently found out about 'git blame -w', which should make this change not too disruptive for the purposes of source-control archaeology; so perhaps now is the time. While I'm at it, I've also taken the opportunity to remove all the trailing spaces from source lines (on the basis that git dislikes them, and is the only thing that seems to have a strong opinion one way or the other). Apologies to anyone downstream of this code who has complicated patch sets to rebase past this change. I don't intend it to be needed again.
This commit is contained in:
32
unix/uxgss.c
32
unix/uxgss.c
@ -29,7 +29,7 @@ const struct keyvalwhere gsslibkeywords[] = {
|
||||
*/
|
||||
|
||||
static void gss_init(struct ssh_gss_library *lib, void *dlhandle,
|
||||
int id, const char *msg)
|
||||
int id, const char *msg)
|
||||
{
|
||||
lib->id = id;
|
||||
lib->gsslogmsg = msg;
|
||||
@ -67,25 +67,25 @@ struct ssh_gss_liblist *ssh_gss_setup(Conf *conf)
|
||||
|
||||
/* Heimdal's GSSAPI Library */
|
||||
if ((gsslib = dlopen("libgssapi.so.2", RTLD_LAZY)) != NULL)
|
||||
gss_init(&list->libraries[list->nlibraries++], gsslib,
|
||||
0, "Using GSSAPI from libgssapi.so.2");
|
||||
gss_init(&list->libraries[list->nlibraries++], gsslib,
|
||||
0, "Using GSSAPI from libgssapi.so.2");
|
||||
|
||||
/* MIT Kerberos's GSSAPI Library */
|
||||
if ((gsslib = dlopen("libgssapi_krb5.so.2", RTLD_LAZY)) != NULL)
|
||||
gss_init(&list->libraries[list->nlibraries++], gsslib,
|
||||
1, "Using GSSAPI from libgssapi_krb5.so.2");
|
||||
gss_init(&list->libraries[list->nlibraries++], gsslib,
|
||||
1, "Using GSSAPI from libgssapi_krb5.so.2");
|
||||
|
||||
/* Sun's GSSAPI Library */
|
||||
if ((gsslib = dlopen("libgss.so.1", RTLD_LAZY)) != NULL)
|
||||
gss_init(&list->libraries[list->nlibraries++], gsslib,
|
||||
2, "Using GSSAPI from libgss.so.1");
|
||||
gss_init(&list->libraries[list->nlibraries++], gsslib,
|
||||
2, "Using GSSAPI from libgss.so.1");
|
||||
|
||||
/* User-specified GSSAPI library */
|
||||
gsspath = conf_get_filename(conf, CONF_ssh_gss_custom)->path;
|
||||
if (*gsspath && (gsslib = dlopen(gsspath, RTLD_LAZY)) != NULL)
|
||||
gss_init(&list->libraries[list->nlibraries++], gsslib,
|
||||
3, dupprintf("Using GSSAPI from user-specified"
|
||||
" library '%s'", gsspath));
|
||||
gss_init(&list->libraries[list->nlibraries++], gsslib,
|
||||
3, dupprintf("Using GSSAPI from user-specified"
|
||||
" library '%s'", gsspath));
|
||||
|
||||
return list;
|
||||
}
|
||||
@ -103,12 +103,12 @@ void ssh_gss_cleanup(struct ssh_gss_liblist *list)
|
||||
* using it.
|
||||
*/
|
||||
for (i = 0; i < list->nlibraries; i++) {
|
||||
dlclose(list->libraries[i].handle);
|
||||
if (list->libraries[i].id == 3) {
|
||||
/* The 'custom' id involves a dynamically allocated message.
|
||||
* Note that we must cast away the 'const' to free it. */
|
||||
sfree((char *)list->libraries[i].gsslogmsg);
|
||||
}
|
||||
dlclose(list->libraries[i].handle);
|
||||
if (list->libraries[i].id == 3) {
|
||||
/* The 'custom' id involves a dynamically allocated message.
|
||||
* Note that we must cast away the 'const' to free it. */
|
||||
sfree((char *)list->libraries[i].gsslogmsg);
|
||||
}
|
||||
}
|
||||
sfree(list->libraries);
|
||||
sfree(list);
|
||||
|
Reference in New Issue
Block a user