avoid lvalue casts.
This commit is contained in:
parent
4d2c417597
commit
965a873335
11
crypto/dist/ssh/readconf.c
vendored
11
crypto/dist/ssh/readconf.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: readconf.c,v 1.28 2006/03/19 16:29:43 elad Exp $ */
|
||||
/* $NetBSD: readconf.c,v 1.29 2006/05/11 00:05:45 mrg Exp $ */
|
||||
/*
|
||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: readconf.c,v 1.145 2005/12/08 18:34:11 reyk Exp $");
|
||||
__RCSID("$NetBSD: readconf.c,v 1.28 2006/03/19 16:29:43 elad Exp $");
|
||||
__RCSID("$NetBSD: readconf.c,v 1.29 2006/05/11 00:05:45 mrg Exp $");
|
||||
|
||||
#include "ssh.h"
|
||||
#include "xmalloc.h"
|
||||
@ -324,6 +324,7 @@ process_config_line(Options *options, const char *host,
|
||||
{
|
||||
char *s, **charptr, *endofnumber, *keyword, *arg, *arg2, fwdarg[256];
|
||||
int opcode, *intptr, value, value2;
|
||||
LogLevel *llptr;
|
||||
size_t len;
|
||||
Forward fwd;
|
||||
|
||||
@ -688,14 +689,14 @@ parse_int:
|
||||
break;
|
||||
|
||||
case oLogLevel:
|
||||
intptr = (int *) &options->log_level;
|
||||
llptr = &options->log_level;
|
||||
arg = strdelim(&s);
|
||||
value = log_level_number(arg);
|
||||
if (value == SYSLOG_LEVEL_NOT_SET)
|
||||
fatal("%.200s line %d: unsupported log level '%s'",
|
||||
filename, linenum, arg ? arg : "<NONE>");
|
||||
if (*activep && (LogLevel) *intptr == SYSLOG_LEVEL_NOT_SET)
|
||||
*intptr = (LogLevel) value;
|
||||
if (*activep && *llptr == SYSLOG_LEVEL_NOT_SET)
|
||||
*llptr = (LogLevel) value;
|
||||
break;
|
||||
|
||||
case oLocalForward:
|
||||
|
18
crypto/dist/ssh/servconf.c
vendored
18
crypto/dist/ssh/servconf.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: servconf.c,v 1.34 2006/03/19 16:20:47 elad Exp $ */
|
||||
/* $NetBSD: servconf.c,v 1.35 2006/05/11 00:05:45 mrg Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||
* All rights reserved
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$OpenBSD: servconf.c,v 1.146 2005/12/08 18:34:11 reyk Exp $");
|
||||
__RCSID("$NetBSD: servconf.c,v 1.34 2006/03/19 16:20:47 elad Exp $");
|
||||
__RCSID("$NetBSD: servconf.c,v 1.35 2006/05/11 00:05:45 mrg Exp $");
|
||||
|
||||
#ifdef KRB4
|
||||
#include <krb.h>
|
||||
@ -469,6 +469,8 @@ process_server_config_line(ServerOptions *options, char *line,
|
||||
{
|
||||
char *cp, **charptr, *arg, *p;
|
||||
int *intptr, value, n;
|
||||
SyslogFacility *sfptr;
|
||||
LogLevel *llptr;
|
||||
ServerOpCodes opcode;
|
||||
u_short port;
|
||||
u_int i;
|
||||
@ -814,25 +816,25 @@ parse_flag:
|
||||
goto parse_flag;
|
||||
|
||||
case sLogFacility:
|
||||
intptr = (int *) &options->log_facility;
|
||||
sfptr = &options->log_facility;
|
||||
arg = strdelim(&cp);
|
||||
value = log_facility_number(arg);
|
||||
if (value == SYSLOG_FACILITY_NOT_SET)
|
||||
fatal("%.200s line %d: unsupported log facility '%s'",
|
||||
filename, linenum, arg ? arg : "<NONE>");
|
||||
if (*intptr == -1)
|
||||
*intptr = (SyslogFacility) value;
|
||||
if (*sfptr == -1)
|
||||
*sfptr = value;
|
||||
break;
|
||||
|
||||
case sLogLevel:
|
||||
intptr = (int *) &options->log_level;
|
||||
llptr = &options->log_level;
|
||||
arg = strdelim(&cp);
|
||||
value = log_level_number(arg);
|
||||
if (value == SYSLOG_LEVEL_NOT_SET)
|
||||
fatal("%.200s line %d: unsupported log level '%s'",
|
||||
filename, linenum, arg ? arg : "<NONE>");
|
||||
if (*intptr == -1)
|
||||
*intptr = (LogLevel) value;
|
||||
if (*llptr == -1)
|
||||
*llptr = value;
|
||||
break;
|
||||
|
||||
case sAllowTcpForwarding:
|
||||
|
Loading…
Reference in New Issue
Block a user