make '' default to file beginning if no large movements yet
[unix-history] / usr / src / usr.bin / rdist / lookup.c
index ae42767..85c4bb0 100644 (file)
@@ -1,6 +1,23 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)lookup.c    4.6 (Berkeley) 85/02/04";
-#endif
+static char sccsid[] = "@(#)lookup.c   5.4 (Berkeley) %G%";
+#endif /* not lint */
 
 #include "defs.h"
 
 
 #include "defs.h"
 
@@ -107,7 +124,7 @@ lookup(name, action, value)
                        continue;
                if (action != LOOKUP) {
                        if (action != INSERT || s->s_type != CONST) {
                        continue;
                if (action != LOOKUP) {
                        if (action != INSERT || s->s_type != CONST) {
-                               sprintf(buf, "%s redefined", name);
+                               (void)sprintf(buf, "%s redefined", name);
                                yyerror(buf);
                        }
                }
                                yyerror(buf);
                        }
                }
@@ -115,7 +132,8 @@ lookup(name, action, value)
        }
 
        if (action == LOOKUP) {
        }
 
        if (action == LOOKUP) {
-               yyerror(sprintf(buf, "%s undefined", name));
+               (void)sprintf(buf, "%s undefined", name);
+               yyerror(buf);
                return(NULL);
        }
 
                return(NULL);
        }