args.c (90331) | args.c (91079) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Keith Muller of the University of California, San Diego and Lance 7 * Visser of Convex Computer Corporation. 8 * --- 26 unchanged lines hidden (view full) --- 35 * SUCH DAMAGE. 36 */ 37 38#ifndef lint 39#if 0 40static char sccsid[] = "@(#)args.c 8.3 (Berkeley) 4/2/94"; 41#endif 42static const char rcsid[] = | 1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Keith Muller of the University of California, San Diego and Lance 7 * Visser of Convex Computer Corporation. 8 * --- 26 unchanged lines hidden (view full) --- 35 * SUCH DAMAGE. 36 */ 37 38#ifndef lint 39#if 0 40static char sccsid[] = "@(#)args.c 8.3 (Berkeley) 4/2/94"; 41#endif 42static const char rcsid[] = |
43 "$FreeBSD: head/bin/dd/args.c 90331 2002-02-07 02:54:30Z green $"; | 43 "$FreeBSD: head/bin/dd/args.c 91079 2002-02-22 20:51:00Z markm $"; |
44#endif /* not lint */ 45 46#include <sys/types.h> 47 48#include <err.h> 49#include <errno.h> 50#include <limits.h> 51#include <stdlib.h> --- 314 unchanged lines hidden (view full) --- 366 mult = 1 << 20; 367 break; 368 case 'g': 369 mult = 1 << 30; 370 break; 371 case 'w': 372 mult = sizeof(int); 373 break; | 44#endif /* not lint */ 45 46#include <sys/types.h> 47 48#include <err.h> 49#include <errno.h> 50#include <limits.h> 51#include <stdlib.h> --- 314 unchanged lines hidden (view full) --- 366 mult = 1 << 20; 367 break; 368 case 'g': 369 mult = 1 << 30; 370 break; 371 case 'w': 372 mult = sizeof(int); 373 break; |
374 default: |
|
374 } 375 376 if (mult != 0) { 377 prevnum = num; 378 num *= mult; 379 /* Check for overflow. */ 380 if (num / mult != prevnum) 381 goto erange; --- 88 unchanged lines hidden --- | 375 } 376 377 if (mult != 0) { 378 prevnum = num; 379 num *= mult; 380 /* Check for overflow. */ 381 if (num / mult != prevnum) 382 goto erange; --- 88 unchanged lines hidden --- |