X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fvlog.c;h=0fab00f14a4ab52182b15c7af48c7dd7c481cdb1;hb=67a4917b07031b387beafaedce413b4207214059;hp=408cc74a0821978a96df5c67e7e6aec0a551ab6a;hpb=064af42167bf4fc9aaea2702d80ce08074b889c0;p=openvswitch diff --git a/lib/vlog.c b/lib/vlog.c index 408cc74a..0fab00f1 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -1,17 +1,17 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira Networks. * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #include @@ -314,7 +314,7 @@ vlog_reopen_log_file(void) char * vlog_set_levels_from_string(const char *s_) { - char *save_ptr; + char *save_ptr = NULL; char *s = xstrdup(s_); char *module, *facility; @@ -393,7 +393,7 @@ vlog_unixctl_set(struct unixctl_conn *conn, const char *args) } static void -vlog_unixctl_list(struct unixctl_conn *conn, const char *args UNUSED) +vlog_unixctl_list(struct unixctl_conn *conn, const char *args OVS_UNUSED) { char *msg = vlog_get_levels(); unixctl_command_reply(conn, 200, msg); @@ -401,7 +401,7 @@ vlog_unixctl_list(struct unixctl_conn *conn, const char *args UNUSED) } static void -vlog_unixctl_reopen(struct unixctl_conn *conn, const char *args UNUSED) +vlog_unixctl_reopen(struct unixctl_conn *conn, const char *args OVS_UNUSED) { if (log_file_name) { int error = vlog_reopen_log_file(); @@ -522,7 +522,7 @@ format_log_message(enum vlog_module module, enum vlog_level level, p++; } field = 0; - while (isdigit(*p)) { + while (isdigit((unsigned char)*p)) { field = (field * 10) + (*p - '0'); p++; }