> @@ -33,7 +33,8 @@ libtspi_la_SOURCES=log.c \
>                     rpc/@RPC@/rpc_context.c \
>                     rpc/tcs_api.c \
>                     rpc/hosttable.c \
> -                   rpc/@RPC@/rpc.c
> +                   rpc/@RPC@/rpc.c \
> +                                tsp_tcsi_param.c
inconsistant indentation?

> +#include <stdlib.h>
> +#include <string.h>
> +#include <stdio.h>
> +#include <bits/local_lim.h>
> +#include "trousers/tss.h"
> +#include "trousers/trousers.h"
> +#include "trousers_types.h"
> +#include "tsplog.h"
> +#include "spi_utils.h"
> +#include "tsp_tcsi_param.h"
> +
> +#define RV_OK 0
> +#define RV_NO_VALUE -1
> +#define RV_NO_MEM -2
> +#define RV_WRONG_VALUE -3
> +#define RV_UNKNOWN_ERR -4

Why not #include <errno.h> and use ENOMEM, EINVAL, etc?  Why reinvent
the wheel?


> +TSS_RESULT
> +convert_port_to_str(int port, char port_str[TCP_PORT_STR_MAX_LEN])
> +{
> +     if (sprintf(port_str, "%d", port) < 0)
> +             return TSPERR(TSS_E_INTERNAL_ERROR);
> +
> +     return TSS_SUCCESS;
> +}

I'm not sure this is worth wrapping, but it should be snprintf not sprintf


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech

Reply via email to