mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
fix a cut-and-paste-o and a warning
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Principal Author: Brian Wellington
|
* Principal Author: Brian Wellington
|
||||||
* $Id: dst_api.c,v 1.79 2001/05/09 23:04:47 bwelling Exp $
|
* $Id: dst_api.c,v 1.80 2001/05/10 04:50:28 bwelling Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@@ -1056,14 +1056,14 @@ isc_result_t
|
|||||||
dst__file_addsuffix(char *filename, unsigned int len,
|
dst__file_addsuffix(char *filename, unsigned int len,
|
||||||
const char *ofilename, const char *suffix)
|
const char *ofilename, const char *suffix)
|
||||||
{
|
{
|
||||||
unsigned int olen = strlen(ofilename);
|
int olen = strlen(ofilename);
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
if (olen > 1 && ofilename[olen - 1] == '.')
|
if (olen > 1 && ofilename[olen - 1] == '.')
|
||||||
olen -= 1;
|
olen -= 1;
|
||||||
else if (olen > 8 && strcmp(ofilename + olen - 8, ".private") == 0)
|
else if (olen > 8 && strcmp(ofilename + olen - 8, ".private") == 0)
|
||||||
olen -= 8;
|
olen -= 8;
|
||||||
else if (olen > 4 && strcmp(ofilename + olen - 8, ".key") == 0)
|
else if (olen > 4 && strcmp(ofilename + olen - 4, ".key") == 0)
|
||||||
olen -= 4;
|
olen -= 4;
|
||||||
|
|
||||||
n = snprintf(filename, len, "%.*s%s", olen, ofilename, suffix);
|
n = snprintf(filename, len, "%.*s%s", olen, ofilename, suffix);
|
||||||
|
Reference in New Issue
Block a user