PATH_MAX is defined via limits.h (I hope that exists on all

systems). MAX_PATH is a typo. int r was never used.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1223 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
aj 2003-06-25 10:19:08 +00:00
parent e7fcb2be88
commit 59da343eea
2 changed files with 4 additions and 2 deletions

View File

@ -36,6 +36,7 @@
#include <ctype.h>
#include <stdarg.h>
#include <string.h>
#include <limits.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
@ -134,7 +135,7 @@ static int get_profile_from_config(struct sc_card *card, char *card_prof_name)
struct sc_context *ctx = card->ctx;
const char *tmp;
scconf_block **blocks, *blk;
int i, r;
int i;
for (i = 0; ctx->conf_blocks[i]; i++) {
blocks = scconf_find_blocks(ctx->conf, ctx->conf_blocks[i],

View File

@ -25,6 +25,7 @@
#include <ctype.h>
#include <stdarg.h>
#include <string.h>
#include <limits.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
@ -353,7 +354,7 @@ static const char *
sc_profile_locate(const char *name)
{
static char path[1024];
char profile_dir[MAX_PATH];
char profile_dir[PATH_MAX];
/* Name with suffix tagged onto it? */
snprintf(path, sizeof(path), "%s.%s", name, SC_PKCS15_PROFILE_SUFFIX);