public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* Fix "minor optimizations"
@ 2004-11-12 15:21 Andreas Schwab
  0 siblings, 0 replies; only message in thread
From: Andreas Schwab @ 2004-11-12 15:21 UTC (permalink / raw)
  To: libc-hacker

What was called "minor optimizations" completely broke the function.

Andreas.

2004-11-12  Andreas Schwab  <schwab@suse.de>

	* nis/ypclnt.c (ypprot_err): Fix "minor optimizations".

--- nis/ypclnt.c.~1.48.~	2004-10-25 11:33:36.000000000 +0200
+++ nis/ypclnt.c	2004-11-12 14:56:22.034832503 +0100
@@ -844,9 +844,9 @@ static const int8_t yp_2_yperr[] =
 int
 ypprot_err (const int code)
 {
-  if (code < YP_VERS || code > YP_NOKEY)
+  if (code < YP_VERS || code > YP_TRUE)
     return YPERR_YPERR;
-  return yp_2_yperr[code];
+  return yp_2_yperr[code - YP_VERS];
 }
 libnsl_hidden_def (ypprot_err)
 

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-11-12 15:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-12 15:21 Fix "minor optimizations" Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).