瀏覽代碼

inet_aton() has a non-traditional return value

tags/v0.9.3
Michael Brown 17 年之前
父節點
當前提交
2863d1a1de
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/core/settings.c

+ 1
- 1
src/core/settings.c 查看文件

@@ -235,7 +235,7 @@ static int set_ipv4 ( struct config_context *context,
235 235
 	struct in_addr ipv4;
236 236
 	int rc;
237 237
 	
238
-	if ( ( rc = inet_aton ( value, &ipv4 ) ) != 0 )
238
+	if ( ( rc = inet_aton ( value, &ipv4 ) ) == 0 )
239 239
 		return rc;
240 240
 	option = set_dhcp_option ( context->options, setting->tag,
241 241
 				   &ipv4, sizeof ( ipv4 ) );

Loading…
取消
儲存