Changeset 78d6a50 in rtems


Ignore:
Timestamp:
12/08/00 22:06:54 (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
cd240018
Parents:
dfa6d4b7
Message:

2000-12-08 Joel Sherrill <joel@…>

  • libc/linkaddr.c: Initialized variable to remove warning.
  • modem/ppp.c, modem/ppp_tty.c: Made numerous variable declarations conditional on PPP_COMPRESS and PPP_FILTER. Commented out variables that were not used because the code using them was commented out. Removed totally unused variables.
  • modem/pppcompress.c: Added parentheses to avoid warnings.
  • pppd/pppmain.c: Removed numerous warnings.
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libnetworking/ChangeLog

    rdfa6d4b7 r78d6a50  
     12000-12-08      Joel Sherrill <joel@OARcorp.com>
     2
     3        * libc/linkaddr.c: Initialized variable to remove warning.
     4        * modem/ppp.c, modem/ppp_tty.c: Made numerous variable declarations
     5        conditional on PPP_COMPRESS and PPP_FILTER.  Commented out variables
     6        that were not used because the code using them was commented out.
     7        Removed totally unused variables.
     8        * modem/pppcompress.c: Added parentheses to avoid warnings.
     9        * pppd/pppmain.c: Removed numerous warnings.
     10
    1112000-11-30      Joel Sherrill <joel@OARcorp.com>
    212
  • c/src/exec/libnetworking/libc/linkaddr.c

    rdfa6d4b7 r78d6a50  
    6161        register char *cp = sdl->sdl_data;
    6262        char *cplim = sdl->sdl_len + (char *)sdl;
    63         register int byte = 0, state = NAMING, new;
     63        register int byte = 0, state = NAMING,
     64                new=0; /* new=0 to avoid warning */
    6465
    6566        bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
  • c/src/libnetworking/ChangeLog

    rdfa6d4b7 r78d6a50  
     12000-12-08      Joel Sherrill <joel@OARcorp.com>
     2
     3        * libc/linkaddr.c: Initialized variable to remove warning.
     4        * modem/ppp.c, modem/ppp_tty.c: Made numerous variable declarations
     5        conditional on PPP_COMPRESS and PPP_FILTER.  Commented out variables
     6        that were not used because the code using them was commented out.
     7        Removed totally unused variables.
     8        * modem/pppcompress.c: Added parentheses to avoid warnings.
     9        * pppd/pppmain.c: Removed numerous warnings.
     10
    1112000-11-30      Joel Sherrill <joel@OARcorp.com>
    212
  • c/src/libnetworking/libc/linkaddr.c

    rdfa6d4b7 r78d6a50  
    6161        register char *cp = sdl->sdl_data;
    6262        char *cplim = sdl->sdl_len + (char *)sdl;
    63         register int byte = 0, state = NAMING, new;
     63        register int byte = 0, state = NAMING,
     64                new=0; /* new=0 to avoid warning */
    6465
    6566        bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
  • c/src/libnetworking/modem/ppp.c

    rdfa6d4b7 r78d6a50  
    135135static int      pppsioctl __P((struct ifnet *, int, caddr_t));
    136136static void     ppp_requeue __P((struct ppp_softc *));
     137#ifdef PPP_COMPRESS
    137138static void     ppp_ccp __P((struct ppp_softc *, struct mbuf *m, int rcvd));
    138139static void     ppp_ccp_closed __P((struct ppp_softc *));
     140#endif
    139141static void     ppp_inproc __P((struct ppp_softc *, struct mbuf *));
    140142static void     pppdumpm __P((struct mbuf *m0));
     
    194196    register struct ppp_softc *sc;
    195197    register int i = 0;
    196     extern void (*netisrs[])__P((void));
     198/*  XXX unused in rtems
     199    extern void (*netisrs[])__P((void)); */
    197200
    198201    for (sc = ppp_softc; i < NPPP; sc++) {
     
    337340    struct proc *p;
    338341{
    339     int s, error, flags, mru, nb, npx;
    340     struct ppp_option_data *odp;
    341     struct compressor **cp;
     342    int s, flags, mru, npx;
    342343    struct npioctl *npi;
    343344    time_t t;
    344345#ifdef PPP_FILTER
     346    int error;
    345347    struct bpf_program *bp, *nbp;
    346348    struct bpf_insn *newcode, *oldcode;
     
    348350#endif /* PPP_FILTER */
    349351#ifdef  PPP_COMPRESS
     352    int nb;
     353    struct ppp_option_data *odp;
     354    struct compressor **cp;
    350355    u_char ccp_option[CCP_MAX_OPTION_LENGTH];
    351356#endif
     
    10171022{
    10181023    struct ppp_softc *sc;
    1019     int i, s, s2;
     1024    int i, s2;
    10201025    struct mbuf *m;
    10211026
     
    11901195    int s, ilen, xlen, proto, rv;
    11911196    u_char *cp, adrs, ctrl;
    1192     struct mbuf *mp, *dmp = NULL;
     1197    struct mbuf *mp;
     1198#ifdef PPP_COMPRESS
     1199    *dmp = NULL;
     1200#endif
    11931201    u_char *iphdr;
    11941202    u_int hlen;
  • c/src/libnetworking/modem/ppp_tty.c

    rdfa6d4b7 r78d6a50  
    304304    struct ppp_softc *sc;
    305305{
    306     int s;
    307 
    308306    if (sc->sc_outm) {
    309307        m_freem(sc->sc_outm);
     
    323321 * Line specific (tty) read routine.
    324322 */
    325 pppread(struct rtems_termios_tty *tty,
     323int pppread(struct rtems_termios_tty *tty,
    326324            rtems_libio_rw_args_t *rw_args)
    327325{
     
    331329
    332330  struct mbuf *m, *m0;
    333   register int s;
    334   int error = 0;
    335331  rtems_interval    ticks;
    336332  register struct ppp_softc *sc = (struct ppp_softc *)tty->t_sc;
     
    381377          rtems_libio_rw_args_t *rw_args)
    382378{
    383   int count,len;
     379  int len;
    384380  char *out_buffer;
    385381  int n,maximum;
     
    575571void modem_sendpacket(struct rtems_termios_tty *tty)
    576572{
    577   struct mbuf *l = NULL;
    578   rtems_unsigned16 status;
    579   int curr;
    580573  register struct mbuf *m;
    581574  register int len;
    582575  register u_char *start, *stop, *cp;
    583   int n, ndone, done, idle;
     576  int n, ndone, done;
    584577  struct mbuf *m2;
    585   int s;
    586578  char c;
    587579   register struct ppp_softc *sc=tty->t_sc;
     
    680672            done = len == 0;
    681673            if (done && m->m_next == NULL) {
    682                 u_char *p, *q;
     674                u_char *p;
    683675                int c;
    684676                u_char endseq[8];
     
    792784    struct ppp_softc *sc = tty->t_sc;
    793785    struct rtems_termios_tty *tp = (struct rtems_termios_tty *) sc->sc_devp;
    794     int s;
    795786
    796787    sc->sc_flags &= ~SC_TIMEOUT;
  • c/src/libnetworking/modem/pppcompress.c

    rdfa6d4b7 r78d6a50  
    279279                 goto uncompressed;
    280280
    281         if (deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) {
     281        if ((deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win)))) {
    282282                ENCODE(deltaS);
    283283                changes |= NEW_W;
    284284        }
    285285
    286         if (deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack)) {
     286        if ((deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack))) {
    287287                if (deltaA > 0xffff)
    288288                        goto uncompressed;
     
    291291        }
    292292
    293         if (deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq)) {
     293        if ((deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq))) {
    294294                if (deltaS > 0xffff)
    295295                        goto uncompressed;
  • c/src/libnetworking/pppd/pppmain.c

    rdfa6d4b7 r78d6a50  
    4040#include <sys/stat.h>
    4141#include <sys/socket.h>
    42 #include <rtems/rtems/tasks.h>
    4342#include <sys/types.h>
    4443#include <netinet/in.h>
     44
     45#include <rtems.h>
     46#include <rtems/rtems_bsdnet.h>
    4547
    4648/* #include <stbconfig.h> */
     
    7375void SetStatusInfo(int state, char * text, int res);
    7476
     77/* prototypes for routines in this file */
     78int connect_script(int fd);
     79
    7580/* interface vars */
    7681char ifname[32];                                /* Interface name */
     
    108113/* Prototypes for procedures local to this file. */
    109114static void cleanup(void);
    110 static void create_pidfile __P((void));
    111115static void close_tty __P((void));
    112116static void get_input __P((void));
     
    114118static struct timeval *timeleft __P((struct timeval *));
    115119static void holdoff_end __P((void *));
     120static void reap_kids __P((void));
     121/* XXX currently unused */
     122#if 0
    116123static int device_script __P((char *[], int, int));
    117 static void reap_kids __P((void));
    118124static void pr_log __P((void *, char *,...));
     125#endif
    119126
    120127extern char *ttyname __P((int));
     
    165172{
    166173        int i;
     174#if 0
    167175        struct timeval timo;
     176#endif
    168177        struct protent *protp;
    169178        struct stat statbuf;
     179#if 0
    170180        char t[100];
     181#endif
    171182
    172183
     
    758769}
    759770
    760 static int input_fd, output_fd;
    761 #include <rtems/rtems/tasks.h>
    762 
    763 
    764 
    765771int modem_fd; /* FIXME: should not be global... */
    766772int connect_script(int fd)
    767773{
    768         int status;
    769774#if 0 /* FIXME: This is WinNT special */
    770775        char program[256] = "TIMEOUT@10@@CLIENT@CLIENTSERVER";
     
    776781        GlobalSystemStatus * volatile stat;
    777782#endif
     783#if 0
    778784/* Connect scripts are almost the same as in Linux Chat ... */
    779785        static char *scripts[] =
     
    782788                "TIMEOUT@5@@\rAT@OK-+++\\c-OK@ATH0@TIMEOUT@90@OK@ATDT%s@CONNECT@@ppp@@Username:@%s@Password:@%s@"
    783789        };
     790#endif
    784791        modem_fd = fd;
    785792#if 0
     
    899906
    900907
     908/* XXX currently unused */
     909#if 0
    901910static void
    902911pr_log __V((void *arg, char *fmt,...))
     
    926935        linep += n;
    927936}
     937#endif
    928938
    929939/*
  • cpukit/libnetworking/ChangeLog

    rdfa6d4b7 r78d6a50  
     12000-12-08      Joel Sherrill <joel@OARcorp.com>
     2
     3        * libc/linkaddr.c: Initialized variable to remove warning.
     4        * modem/ppp.c, modem/ppp_tty.c: Made numerous variable declarations
     5        conditional on PPP_COMPRESS and PPP_FILTER.  Commented out variables
     6        that were not used because the code using them was commented out.
     7        Removed totally unused variables.
     8        * modem/pppcompress.c: Added parentheses to avoid warnings.
     9        * pppd/pppmain.c: Removed numerous warnings.
     10
    1112000-11-30      Joel Sherrill <joel@OARcorp.com>
    212
  • cpukit/libnetworking/libc/linkaddr.c

    rdfa6d4b7 r78d6a50  
    6161        register char *cp = sdl->sdl_data;
    6262        char *cplim = sdl->sdl_len + (char *)sdl;
    63         register int byte = 0, state = NAMING, new;
     63        register int byte = 0, state = NAMING,
     64                new=0; /* new=0 to avoid warning */
    6465
    6566        bzero((char *)&sdl->sdl_family, sdl->sdl_len - 1);
Note: See TracChangeset for help on using the changeset viewer.